AttributeCollection.Count Egenskap

Definition

Hämtar antalet attribut i AttributeCollection objektet.

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

Egenskapsvärde

Antalet objekt i samlingen.

Exempel

I följande exempel visas hur du använder Count egenskapen för att skriva antalet attribut på en kontroll till den innehållande sidan.

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

Gäller för

Se även