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