Share via


Threads.Count Property

Definition

Gets a value indicating the number of objects in the Threads 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 value indicating the number of objects in the Threads collection.

Attributes

Examples

The following example demonstrates how to use the Count property.

public static void ThreadsCount(DTE dte)  
{  
    EnvDTE.Threads threads = dte.Debugger.CurrentProgram.Threads;  
    EnvDTE.StackFrames stackFrames = dte.Debugger.CurrentThread.StackFrames;  
    MessageBox.Show("\nThere are  " + threads.Count +   
                    " threads running.\n", "Threads Count Property Test" );  
}  
Shared Sub ThreadsCount(ByRef dte As EnvDTE.DTE)  
    Dim threads As EnvDTE.Threads = dte.Debugger.CurrentProgram.Threads  
    MessageBox.Show("There are " + threads.Count.ToString() + _  
                    " threads running", "Threads Test - Count Property")  
End Sub  

Applies to