Process.Threads 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得正在相關的處理序中執行的執行緒集。
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
屬性值
ProcessThread 類型的陣列,代表目前正在相關聯處理序中執行的作業系統執行緒。
- 屬性
例外狀況
備註
這個屬性傳回的值代表最近重新整理的執行緒。 若要取得最新的資訊,您需要先呼叫 Refresh() 方法。
執行緒會在進程中執行程式碼。 每個進程都是以單一線程啟動,其主要執行緒。 任何執行緒都可以建立其他執行緒。 進程內的執行緒會共用進程的位址空間。
使用 ProcessThread 來取得與目前進程相關聯的所有線程。 主執行緒不一定位於陣列中的索引零。