ValidatorCollection.Count 屬性

定義

取得集合中的參考數。

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

屬性值

Int32

在頁面中的 ValidatorCollection 之驗證控制項數。

實作

範例

下列程式碼範例示範如何使用 Count 屬性。

// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection = Page.Validators;
// Show the number of validators of the page.
int count = myCollection.Count;
' Get 'Validators' of the page to myCollection.
Dim myCollection As ValidatorCollection = Page.Validators
' Show the number of validators of the page.
Dim count As Integer = myCollection.Count

適用於

另請參閱