共用方式為


WorkflowDesignerLoader.GetFileWriter(String) 方法

定義

在衍生類別中覆寫時,取得 WorkflowDesignerLoader 用來寫入指定檔案的物件。

public:
 abstract System::IO::TextWriter ^ GetFileWriter(System::String ^ filePath);
public abstract System.IO.TextWriter GetFileWriter (string filePath);
abstract member GetFileWriter : string -> System.IO.TextWriter
Public MustOverride Function GetFileWriter (filePath As String) As TextWriter

參數

filePath
String

字串,其中包含要寫入的檔案路徑。

傳回

要寫入檔案的 TextWriter

備註

下列範例顯示如何在呼叫 TextWriter 多載方法時建立並傳回 GetFileWriter 物件。

public override TextWriter GetFileWriter(string filePath)
{
    return new StreamWriter(new FileStream(filePath, FileMode.OpenOrCreate));
}
Public Overrides Function GetFileWriter(ByVal filePath As String) As TextWriter
    Return New StreamWriter(New FileStream(filePath, FileMode.OpenOrCreate))
End Function

適用於