Process.Threads 屬性

定義

取得在相關聯進程中執行的線程集。

public:
 property System::Diagnostics::ProcessThreadCollection ^ Threads { System::Diagnostics::ProcessThreadCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Diagnostics.ProcessThreadCollection Threads { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Threads : System.Diagnostics.ProcessThreadCollection
Public ReadOnly Property Threads As ProcessThreadCollection

屬性值

一個型別 ProcessThread 的陣列,代表目前在相關程序中執行的作業系統執行緒。

屬性

例外狀況

該程序沒有 Id,或是該實例沒有相關聯 Process

-或-

相關流程已經退出。

備註

此屬性回傳的值代表最近一次刷新的執行緒。 要獲得最新資訊,你需要先打電話給 Refresh() Software。

執行緒執行程序中的程式碼。 每個程序從一個執行緒啟動,該執行緒為其主要執行緒。 任何執行緒都可以產生額外的執行緒。 程序內的執行緒共享該程序的位址空間。

ProcessThread 來取得與目前程序相關的所有執行緒。 主執行緒不一定在陣列的索引為零。

適用於

另請參閱