WmiDataReaderTask 생성자

정의

WmiDataReaderTask 클래스의 새 인스턴스를 초기화합니다.

public:
 WmiDataReaderTask();
public WmiDataReaderTask ();
Public Sub New ()

예제

다음 코드 샘플에서는 생성자를 사용하여 새 WmiDataReaderTask 코드를 만듭니다.

WmiDataReaderTask myTask = new WmiDataReaderTask();  
Dim myTask As WmiDataReaderTask =  New WmiDataReaderTask()  

설명

코드 샘플은 작업 생성자를 호출하는 방법을 보여줍니다. 그러나 대부분의 경우 태스크를 패키지의 멤버로 만듭니다. 작업 캐스팅에 대한 자세한 내용은 의 발언을 참조하세요 Add.

Package pkg = new Package();  
Executable exec1 = pkg.Executables.Add("STOCK:WmiDataReaderTask");  
TaskHost th = exec1 as TaskHost;  
// You can cast the InnerObject of the TaskHost  
// to the specific class.  
// For the code samples, that task properties are accessed using  
// the Properties of the TaskHost.  
// WmiDataReaderTask myTask = th.InnerObject as WmiDataReaderTask;  
Dim pkg As Package =  New Package()   
Dim exec1 As Executable =  pkg.Executables.Add("STOCK:WmiDataReaderTask")   
Dim th As TaskHost =  exec1 as TaskHost   
' You can cast the InnerObject of the TaskHost  
' to the specific class.  
' For the code samples, that task properties are accessed using  
' the Properties of the TaskHost.  
' Dim myTask As WmiDataReaderTask =  th.InnerObject as WmiDataReaderTask  

변수thWmiDataReaderTask 사용하여 속성 및 메서드를 TaskHost 사용할 수 있습니다.

적용 대상