NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Process.Threads

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

[Visual Basic]
Public ReadOnly Property Threads As ProcessThread ()
[C#]
public ProcessThread[] Threads {get;}
[C++]
public: __property ProcessThread* get_Threads();
[JScript]
public function get Threads() : ProcessThread[];

Property Value

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

Exceptions

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

-or-

The associated process has exited.

Remarks

A thread executes code in a process. Each process is started with a single thread, its primary thread. Any of its threads can create additional threads. The total number of threads is determined by available RAM. 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 the thread at index zero in the array.

See Also

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