XDocuments2.Count property

Gets a count of the number of XDocument objects contained in the collection.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
ReadOnly Property Count As Integer
    Get
'Usage
Dim instance As XDocuments2
Dim value As Integer

value = instance.Count
int Count { get; }

Property value

Type: System.Int32

Implements

XDocuments.Count

Remarks

Important

This member can be accessed without restrictions.

Examples

In the following example, the Count property of the XDocuments collection is used within a for loop to iterate through the collection of XDocument objects and display a message box indicating the Uniform Resource Identifier (URI) location for each currently open form:

for (int i=0; i < thisApplication.XDocuments.Count; i++)
{
   thisXDocument.UI.Alert("XDocument URI: " + thisApplication.XDocuments[i].URI);
}

See also

Reference

XDocuments2 interface

XDocuments2 members

Count overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace