WebServiceTask 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 WebServiceTask 類別的新執行個體。
public:
WebServiceTask();
public WebServiceTask ();
Public Sub New ()
範例
下列程式碼範例會使用此函式來建立新的 WebServiceTask 。
WebServiceTask myTask = new WebServiceTask();
Dim myTask As WebServiceTask = New WebServiceTask()
備註
程式碼範例會示範如何呼叫工作的函式。 不過,在大部分情況下,您會將工作建立為封裝的成員。 如需轉換工作的詳細資訊,請參閱中的備註 Add 。
Package pkg = new Package();
Executable exec1 = pkg.Executables.Add("STOCK:WebServiceTask");
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.
// WebServiceTask myTask = th.InnerObject as WebServiceTask;
Dim pkg As Package = New Package()
Dim exec1 As Executable = pkg.Executables.Add("STOCK:WebServiceTask")
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 WebServiceTask = th.InnerObject as WebServiceTask
您 WebServiceTask 可以使用變數來使用的屬性和方法 TaskHost th 。