FileSystemTask 建構函式

定義

初始化 FileSystemTask 類別的新執行個體。

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

範例

下列程式碼範例會使用此函式來建立新的 FileSystemTask

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

備註

程式碼範例會示範如何呼叫工作的函式。 不過,在大部分情況下,您會將工作建立為封裝的成員。 如需轉換工作的詳細資訊,請參閱中的備註 Add

Package pkg = new Package();  
Executable exec1 = pkg.Executables.Add("STOCK:FileSystemTask");  
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.  
// FileSystemTask myTask = th.InnerObject as FileSystemTask;  
Dim pkg As Package =  New Package()   
Dim exec1 As Executable =  pkg.Executables.Add("STOCK:FileSystemTask")   
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 FileSystemTask =  th.InnerObject as FileSystemTask  

FileSystemTask 可以使用變數來使用的屬性和方法 TaskHost th

適用於