Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Count (General Extensibility)
ID
Top
Collapse the table of content
Expand the table of content

Count Property (General Extensibility)

Visual Studio .NET 2003

Returns a value indicating the number of objects in the collection.

[Visual Basic .NET]
Public ReadOnly Property Count() As Long
[Visual Basic 6]
Property Get Count() As Long
[C++]
HRESULT __stdcall get_Count(
   /* [out, retval] */ long* retVal
);
[C#]
int Count {get;}
[JScript .NET]
public function get Count() : int

Example

Sub CountExample()
   ' Closes all saved documents.
   Dim iCtr As Integer
   For iCtr = 1 To DTE.Documents.Count
      If DTE.Documents.Item(iCtr).Saved Then
         DTE.Documents.Item(iCtr).Close()
      End If
   Next iCtr
End Sub

See Also

Applies To: AddIns Collection | Breakpoints Collection | BuildDependencies Collection | CodeElements Collection | Commands Collection | ConfigurationManager Object | Configurations Collection | ContextAttributes Collection | Documents Collection | Expressions Collection | FontsAndColorsItems Collection | IFuncInfo Object | IInterfaceInfo Object | IParamInfo Object | IVCCollection Collection | Languages Collection | LinkedWindows Collection | OutputGroups Collection | OutputWindowPanes Collection | Processes Collection | Programs Collection | ProjectItems Collection | Projects Collection | Properties Collection | SelectedItems Collection | SelectionContainer Object | Solution Object | SolutionConfigurations Collection | SolutionContexts Collection | StackFrames Collection | TaskItems Collection | TextPanes Collection | TextRanges Collection | Threads Collection | ToolBoxItems Collection | ToolBoxTabs Collection | TypeLibCollection Collection | UIHierarchyItems Collection | VCCodeElements Collection | WindowConfigurations Collection | Windows Collection | WizCombo Object

Show:
© 2015 Microsoft