次の方法で共有


ViewInfos.Count Property

Gets a count of the number of ViewInfoObject object contained in the ViewInfosCollection 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 ViewInfos
Dim value As Integer

value = instance.Count
int Count { get; }

Property Value

Type: System.Int32

Remarks

Important

This member can be accessed without restrictions.

Examples

In the following example, the Count property is used within a for loop to iterate through the collection of ViewInfo objects and display a message box indicating the name of each view implemented in the form:

for (int i=0; i < thisXDocument.ViewInfos.Count; i++)
{
 thisXDocument.UI.Alert("View name: " + thisXDocument.ViewInfos[i].Name);
}

See Also

Reference

ViewInfos Interface

ViewInfos Members

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace