TreeNode::Depth Property
Gets the depth of the node.
Assembly: System.Web (in System.Web.dll)
The following code example demonstrates how use the Depth property to determine the depth of a node. It initializes all nodes with a depth of one to a selected state. For this example to work correctly, you must copy the sample XML data below to a file named Newsgroup.xml.
The following code is sample XML data for the previous example.
<category name="news.microsoft.com">
<group name="microsoft.public.dotnet.framework.aspnet"/>
<group name="microsoft.public.dotnet.framework.aspnet.mobile"/>
<group name="microsoft.public.dotnet.framework.aspnet.webservices"/>
</category>
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.