Click or drag to resize

TreeNodeExtensionsElementAtT Method

Gets a node inside a tree by using an index array.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static T ElementAt<T>(
	this T rootNode,
	IEnumerable<int> index
)
where T : Object, ITreeListNode<T>

Parameters

rootNode  T
The root node of the tree.
index  IEnumerableInt32
The index array. The member at index 0 must always be 0, since this indicates the provided root node. Examples: {0} designates the root node; {0, 1} designates the 2nd child of the root node; {0,1,0} designates the first child of the second child of the root node.

Type Parameters

T
Type of node.

Return Value

T
The node that is designated by the provided index.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionrootNode
ArgumentOutOfRangeException Index list is null or empty; or index[0] is not 0; or index is otherwise invalid.
See Also