Process.Threads 속성

정의

연결된 프로세스에서 실행 중인 스레드를 가져오거나 설정합니다.

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 형식의 배열입니다.

특성

예외

프로세스에 Id가 없거나 Process 인스턴스와 연결된 프로세스가 없습니다.

또는

연결된 프로세스가 종료되었습니다.

설명

이 속성에서 반환된 값은 가장 최근에 새로 고친 스레드를 나타냅니다. 최신 정보를 얻으려면 먼저 메서드를 호출 Refresh() 해야 합니다.

스레드는 프로세스에서 코드를 실행합니다. 각 프로세스는 단일 스레드, 기본 스레드로 시작됩니다. 모든 스레드는 추가 스레드를 만들 수 있습니다. 프로세스 내의 스레드는 프로세스의 주소 공간을 공유합니다.

를 사용하여 ProcessThread 현재 프로세스와 연결된 모든 스레드를 가져옵니다. 주 스레드가 반드시 배열의 인덱스 0에 있는 것은 아닙니다.

적용 대상

추가 정보