IHierarchyData::HasChildren Property
Indicates whether the hierarchical data node that the IHierarchyData object represents has any child nodes.
Assembly: System.Web (in System.Web.dll)
The HasChildren property is a convenience property that enables callers to avoid checking the return value of the GetChildren method for nullptr. If the HasChildren property returns true, call the GetChildren method to retrieve an IHierarchicalEnumerable collection of child nodes.
The following code example demonstrates how an ASP.NET hierarchical data-bound control uses an IHierarchyData object in a recursive data-binding method. The items in an IHierarchicalEnumerable collection are enumerated, and for each an IHierarchyData object is retrieved using the GetHierarchyData method. Finally, the HasChildren property is checked to determine whether to recurse. This code example is part of a larger example provided for the HierarchicalDataBoundControl class.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.