SendMailTask Oluşturucusu
Yeni bir başlatır örnek , SendMailTask WalkTree
Ad Alanı: Microsoft.SqlServer.Dts.Tasks.SendMailTask
Derleme: Microsoft.SqlServer.SendMailTask (Microsoft.SqlServer.SendMailTask içinde.dll)
Sözdizimi
'Bildirim
Public Sub New
'Kullanım
Dim instance As New SendMailTask()
public SendMailTask()
public:
SendMailTask()
new : unit -> SendMailTask
public function SendMailTask()
Açıklamalar
Kod örneği, görev kurucusunu çağırmak gösterilmiştir.Ancak, çoğu durumda, görev bir paket üye olarak oluşturmakta.Görev çevrim hakkında daha fazla bilgi için bkz: Açıklamalar içinde Add.
Package pkg = new Package();
Executable exec1 = pkg.Executables.Add("STOCK:SendMailTask");
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.
// SendMailTask myTask = th.InnerObject as SendMailTask;
Dim pkg As Package = New Package()
Dim exec1 As Executable = pkg.Executables.Add("STOCK:SendMailTask")
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 SendMailTask = th.InnerObject as SendMailTask
Özellikleri ve yöntemleri, SendMailTask kullanarak kullanılabilir olan TaskHost değişkeni, th.
Örnekler
Aşağıdaki kod örneği oluşturur Yeni bir SendMailTask kullanarak kurucusu.
SendMailTask myTask = new SendMailTask();
Dim myTask As SendMailTask = New SendMailTask()