Show All

# Count Property (DataObjects Collection)

A read-only property that returns a count of the number of DataObject objects contained in the DataObjects collection.

expression.Count

expression Required. An expression that returns a reference to the DataObjects collection.

## Security Level

0: Can be accessed without restrictions.

## Remarks

The Count property returns a long integer value.

## Example

In the following example, the Count property is used within a Microsoft JScript for loop to iterate through the collection of DataObject objects and display a message box indicating the name of each DataObject object associated with the form:

    for (i=0; i < XDocument.DataObjects.Count; i++)
    {
       XDocument.UI.Alert("DataObject name: " + XDocument.DataObjects(i).Name);
    }

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp