DataKeyCollection.Count Property

Gets the number of items in the collection.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public int Count { get; }

Property Value

Type: System.Int32
The number of items in the collection.

Implements

ICollection.Count

Use the Count property to determine the number of items in the collection. This property is commonly used when iterating through the collection to determine the upper bound.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft