Windows.Count 属性
获取包含在 WindowsCollection 集合中的 WindowObject 对象的数目。
命名空间: 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 Windows
Dim value As Integer
value = instance.Count
int Count { get; }
属性值
类型:System.Int32
备注
重要
可以无限制访问此成员。
示例
在以下示例中,Count 属性用在 for 循环中,以在 Window 对象的集合中进行迭代,并显示一个消息框以指示窗口类型值:
for (int i=0; i < thisApplication.Windows.Count; i++)
{
thisXDocument.UI.Alert("Window type: " + thisApplication.Windows[i].WindowType);
}