共用方式為


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

適用於

另請參閱