AutomationElementCollection.Count Właściwość

Definicja

Pobiera liczbę elementów w tej kolekcji.

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

Wartość właściwości

Int32

Liczba elementów.

Implementuje

Przykłady

W poniższym przykładzie pokazano Count używaną właściwość.

// elementCollection is an AutomationElementCollection.
AutomationElement[] elementArray = new AutomationElement[elementCollection.Count];
elementCollection.CopyTo(elementArray, 0);
' elementCollection is an AutomationElementCollection.
Dim elementArray(elementCollection.Count) As AutomationElement
elementCollection.CopyTo(elementArray, 0)

Dotyczy