Processes.Count Property
Gets a value indicating the number of objects in the Processes collection.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property Count As Integer
int Count { get; }
property int Count {
int get ();
}
abstract Count : int with get
function get Count () : int
Property Value
Type: System.Int32
An integer representing the number of Process objects in the collection.
Examples
The following example demonstrates how to use the Count property.
To test this property:
- Open the target project and run the add-in.
public static void Count(DTE dte)
{
EnvDTE.Processes processes = dte.Debugger.LocalProcesses;
MessageBox.Show("Number of local processes: " +
processes.Count, "Testing Processes Count Property");
}
Shared Sub Count(ByRef dte As EnvDTE.DTE)
Dim processes As EnvDTE.Processes = dte.Debugger.LocalProcesses
MessageBox.Show("Number of local processes: " + _
processes.Count.ToString(), "Processes Test - Count Property")
End Sub
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples