共用方式為


Processes.Count Property

Definition

Gets a value indicating the number of objects in the Processes collection.

public:
 property int Count { int get(); };
public:
 property int Count { int get(); };
[System.Runtime.InteropServices.DispId(3)]
public int Count { [System.Runtime.InteropServices.DispId(3)] get; }
[<System.Runtime.InteropServices.DispId(3)>]
[<get: System.Runtime.InteropServices.DispId(3)>]
member this.Count : int
Public ReadOnly Property Count As Integer

Property Value

An integer representing the number of Process objects in the collection.

Attributes

Examples

The following example demonstrates how to use the Count property.

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  

Applies to