Represents a hierarchical collection that can be enumerated with an IEnumerator interface. Collections that implement the interface are used by ASP.NET site navigation and data source controls.
Assembly: System.Web (in System.Web.dll)
Thetype exposes the following members.
|AsParallel||Enables parallelization of a query. (Defined by ParallelEnumerable.)|
|AsQueryable||Converts an IEnumerable to an IQueryable. (Defined by Queryable.)|
|Cast<TResult>||Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)|
|OfType<TResult>||Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)|
The interface extends the IEnumerable interface and exposes GetHierarchyData, which is a method used to retrieve an IHierarchyData object from an enumerated item, in addition to the GetEnumerator method.
Typically, clients that use collections retrieve an IEnumerator object by calling the GetEnumerator method, then iterate through the enumeration and call the GetHierarchyData on each enumerated item to retrieve an IHierarchyData object.
The following code example demonstrates how to implement the interface with a class that extends ArrayList and provides a collection of IHierarchyData objects that wrap FileSystemInfo objects. The collection is used by classes that derive from HierarchicalDataSourceView to return a collection of hierarchical nodes when the Select method is called. This code example is part of a larger example provided for the HierarchicalDataSourceControl class.