Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 1.1
.NET Framework
Reference
Class Library
Control Class
Properties
 HasChildren Property
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
Control.HasChildren Property

Gets a value indicating whether the control contains one or more child controls.

[Visual Basic]
Public ReadOnly Property HasChildren As Boolean
[C#]
public bool HasChildren {get;}
[C++]
public: __property bool get_HasChildren();
[JScript]
public function get HasChildren() : Boolean;

Property Value

true if the control contains one or more child controls; otherwise, false.

Remarks

If the Controls collection has a Count greater than zero, the HasChildren property will return true. Accessing the HasChildren property does not force the creation of a Control.ControlCollection if the control has no children, so referencing this property can provide a performance benefit when walking a tree of controls.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Control Class | Control Members | System.Windows.Forms Namespace | Count

© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker