次の方法で共有


FileSystemTask コンストラクター

FileSystemTask クラスの新しいインスタンスを初期化します。

名前空間:  Microsoft.SqlServer.Dts.Tasks.FileSystemTask
アセンブリ:  Microsoft.SqlServer.FileSystemTask (Microsoft.SqlServer.FileSystemTask.dll)

構文

'宣言
Public Sub New
'使用
Dim instance As New FileSystemTask()
public FileSystemTask()
public:
FileSystemTask()
new : unit -> FileSystemTask
public function 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 を使用して利用できます。

使用例

次のコード サンプルでは、コンストラクターを使用して新しい FileSystemTask を作成します。

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

関連項目

参照

FileSystemTask クラス

Microsoft.SqlServer.Dts.Tasks.FileSystemTask 名前空間