Share via


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
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

See Also

Reference

Processes Interface

EnvDTE Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples