Table of Contents

NodeAt Method

Definition

NodeAt<T>(IDecorator<IHierarchy<T>>, int)

Returns the node at the specified index of a hierarchical structure.

public static IHierarchy<T> NodeAt<T>(this IDecorator<IHierarchy<T>> decorator, int index)

Parameters

decorator IDecorator<IHierarchy<T>>

The decorator that wraps the IHierarchy<T> to extend.

index int

The zero-based index at which a node should be retrieved in the hierarchical structure.

Returns

IHierarchy<T>

The node at the specified index in the hierarchical structure.

Type Parameters

T

The type of the instance represented by the specified decorator in the hierarchical structure.

Exceptions

ArgumentNullException

decorator is null.

ArgumentOutOfRangeException

index is less than zero - or - index exceeded the count of nodes in the hierarchical structure.