AttributeCollection.Count 屬性

定義

取得 AttributeCollection 物件中的屬性數目。

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

屬性值

集合中的項目數目

範例

下列範例示範如何使用 Count 屬性,將 控制項上的屬性數目寫入至包含的頁面。

Response.Write("Attribute Collection  count before PostBack = " + myAttributeCollection.Count);
         Response.Write("Attribute Collection count before PostBack = " & _
myAttributeCollection.Count.ToString())

適用於

另請參閱