Process.Threads Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the set of threads that are running in the associated process.
public:
property System::Diagnostics::ProcessThreadCollection ^ Threads { System::Diagnostics::ProcessThreadCollection ^ get(); };
public System.Diagnostics.ProcessThreadCollection Threads { get; }
[System.ComponentModel.Browsable(false)]
public System.Diagnostics.ProcessThreadCollection Threads { get; }
member this.Threads : System.Diagnostics.ProcessThreadCollection
[<System.ComponentModel.Browsable(false)>]
member this.Threads : System.Diagnostics.ProcessThreadCollection
Public ReadOnly Property Threads As ProcessThreadCollection
An array of type ProcessThread representing the operating system threads currently running in the associated process.
- Attributes
The process does not have an Id, or no process is associated with the Process instance.
-or-
The associated process has exited.
The value returned by this property represents the most recently refreshed threads. To get the most up to date information, you need to call Refresh() method first.
A thread executes code in a process. Each process is started with a single thread, its primary thread. Any thread can create additional threads. Threads within a process share the address space of the process.
Use ProcessThread to get all the threads associated with the current process. The primary thread is not necessarily at index zero in the array.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: