ClassMicrosoft.VisualBasic.Collection SyntaxDim result As Integer = objectVariable.Count
DescriptionThe Count property returns the number of items currently contained in a collection. Usage at a GlanceCollections are 1-based; this differs from arrays, which are 0-based. Collection items range from 1 to the value returned by the Count property. ExampleFor counter = 1 To someCollection.Count oneItem = someCollection.Item(counter) ...more code here... Next counter Version DifferencesVisual Basic 2005 adds support for generics to several collection-style classes. Generics are discussed in Chapter 10. See AlsoCollection Class, Collection.Add Method, Collection.Item Property, Collection.Remove Method |