NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataDocumentNavigator.IndexInParent

Gets the zero-based index of this node's position in its parent node.

[Visual Basic]
Overridable Public ReadOnly Property IndexInParent As Integer
[C#]
public int IndexInParent {override get;}
[C++]
public: __property virtual int get_IndexInParent();
[JScript]
public function get IndexInParent() : int;

Property Value

The index position of this node within its parent node.

Returns-1 if there is no parent node. You can, therefore, use this to find out whether there is a parent node for the current node.

Remarks

For attributes, this property returns the index in the list of attributes. For child elements, it returns the index in the list of child nodes. The following is always true (assuming the tree is not changed in the middle of the execution of this code):

[C#]

DocumentNavigator other = this.Clone();
other.MoveToParent();
other.MoveToChild( this.IndexInParent );
Assert(other.IsSame(this) == true);

See Also

DataDocumentNavigator Class | DataDocumentNavigator Members | System.NewXml Namespace