Export (0) Print
Expand All
Expand Minimize

Count Property

Visual Studio .NET 2003

Returns number of items in the collection.

[Visual Basic .NET]
Public ReadOnly Property Count() As Object
[Visual Basic 6]
Property Get Count() As Variant
HRESULT __stdcall get_Count(
   /* [out, retval] */ VARIANT* retVal
public object Count {get;}
[JScript .NET]
public function get Count() : Object


This property returns the number of items in the collection.


Imports EnvDTE
Imports System.Diagnostics
Imports VisualStudio.VsWizard
Public Module Module2

Sub CountColl()
        Dim collControls As ControlCollection
        Dim iCtlCount As Object
        iCtlCount = collControls.Count
        MsgBox("You have " + iCtlCount + " in your collection.")
    End Sub

End Module

See Also

Applies To: ControlCollection Collection | TypeLibCollection Collection

© 2014 Microsoft