ViewInfos.Count 属性
获取包含在 ViewInfosCollection 集合中的 ViewInfoObject 对象的数目。
命名空间: Microsoft.Office.Interop.InfoPath.SemiTrust
程序集: Microsoft.Office.Interop.InfoPath.SemiTrust(位于 Microsoft.Office.Interop.InfoPath.SemiTrust.dll 中)
语法
声明
ReadOnly Property Count As Integer
Get
用法
Dim instance As ViewInfos
Dim value As Integer
value = instance.Count
int Count { get; }
属性值
类型:System.Int32
备注
重要
可以无限制访问此成员。
示例
在以下示例中,Count 属性用在 for 循环中,以便在 ViewInfo 对象的集合中进行迭代,并显示一个消息框以指示在表单中实现的每个视图的名称:
for (int i=0; i < thisXDocument.ViewInfos.Count; i++)
{
thisXDocument.UI.Alert("View name: " + thisXDocument.ViewInfos[i].Name);
}