The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
AttributeCollection::Count Property
.NET Framework (current version)
Gets the number of attributes.
Assembly: System (in System.dll)
You can use the Count property to set the limits of a loop that iterates through a collection of objects. If the collection is zero-based, be sure to use Count - 1 as the upper boundary of the loop.
The following code example uses the Count property to print the number of properties on button1 in a text box. It assumes that button1 and textBox1 have been created on a form.
.NET Framework
Available since 1.1
Available since 1.1
Show: