childrenCollection.Count property

The Count property gets the number of child objects in the collection.

This property is read-only.

Syntax

Count = childrenCollection.Count

Property value

The read-only number of child objects in the collection.

Examples

The following JScript example uses childrenCollection.Count to enumerate a collection of child objects and access them by index.

// Retrieve a collection of all the children in a WPDObject.

var childrenCollection = wpdObject.Children;

// Enumerate the children in the collection.

for (i=0; i < childrenCollection.Count; i++)
{
    // Access a child object by numeric index.
    var aChild = childrenCollection[i]; 
}

Requirements

Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]

See also

childrenCollection Object