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
[C++]
HRESULT __stdcall get_Count(
   /* [out, retval] */ VARIANT* retVal
);
[C#]
public object Count {get;}
[JScript .NET]
public function get Count() : Object

Remarks

This property returns the number of items in the collection.

Example

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

Show:
© 2014 Microsoft