This documentation is archived and is not being maintained.

Process.Threads Property

Gets the set of threads that are running in the associated process.

[Visual Basic]
Public ReadOnly Property Threads As ProcessThreadCollection
public ProcessThreadCollection Threads {get;}
public: __property ProcessThreadCollection* get_Threads();
public function get Threads() : ProcessThreadCollection;

Property Value

An array of type ProcessThread representing the operating system threads currently running in the associated process.


Exception Type Condition
SystemException The process does not have an Id, or no process is associated with the Process instance.


The associated process has exited.


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.

Windows 98 Platform Note:  This property is not available on this platform if you started the process with ProcessStartInfo.UseShellExecute set to true.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Process Class | Process Members | System.Diagnostics Namespace | ProcessThread | BasePriority