Windows.Count 属性

定义

获取集合中包含的对象数 WindowObjectWindowsCollection 计数。

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

属性值

示例

在以下示例中,Count 属性用在 for 循环中,以在 Window 对象的集合中进行迭代,并显示一个消息框以指示窗口类型值:

for (int i=0; i &lt; thisApplication.Windows.<span class="label">Count</span>; i++)
{
 thisXDocument.UI.Alert("Window type: " + thisApplication.Windows[i].WindowType);
}

注解

重要说明:可以不受限制地访问此成员。

适用于