다음을 통해 공유


Task.CurrentId 속성

정의

현재 실행 중인 .의 ID를 반환합니다 Task.

public:
 static property Nullable<int> CurrentId { Nullable<int> get(); };
public static int? CurrentId { get; }
static member CurrentId : Nullable<int>
Public Shared ReadOnly Property CurrentId As Nullable(Of Integer)

속성 값

시스템에서 현재 실행 중인 작업에 할당된 정수입니다.

설명

CurrentId static 는 태스크가 실행 중인 코드에서 현재 실행 중인 작업의 식별자를 가져오는 데 사용되는 (SharedVisual Basic의 경우) 속성입니다. 특정 Task 인스턴스의 Id 식별자를 반환하는 속성과 다릅니다. 태스크가 CurrentId 실행 중인 코드 외부에서 값을 검색하려고 하면 속성이 반환됩니다 null.

충돌은 매우 드물지만 작업 식별자가 고유하지는 않습니다.

적용 대상

추가 정보