Sdílet prostřednictvím


AutomationElementCollection.Count Vlastnost

Definice

Získá počet elementů v této kolekci.

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

Hodnota vlastnosti

Int32

Počet prvků.

Implementuje

Příklady

Následující příklad ukazuje použitou Count vlastnost.

// 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)

Platí pro