XmlWriter.WriteWhitespace(String) XmlWriter.WriteWhitespace(String) XmlWriter.WriteWhitespace(String) XmlWriter.WriteWhitespace(String) Method

定義

在衍生類別中覆寫時,寫出指定的空白字元。When overridden in a derived class, writes out the given white space.

public:
 abstract void WriteWhitespace(System::String ^ ws);
public abstract void WriteWhitespace (string ws);
abstract member WriteWhitespace : string -> unit
Public MustOverride Sub WriteWhitespace (ws As String)

參數

ws
String String String String

空白字元的字串。The string of white space characters.

例外狀況

字串包含非泛空白字元。The string contains non-white space characters.

在先前的非同步作業完成前呼叫了 XmlWriter 方法。An XmlWriter method was called before a previous asynchronous operation finished. 在此情況下,會擲回 InvalidOperationException 與「非同步作業已經在進行中」的訊息。In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."

備註

這個方法用來以手動方式設定您的文件的格式。This method is used to manually format your document.

這個方法的非同步版本,請參閱WriteWhitespaceAsyncFor the asynchronous version of this method, see WriteWhitespaceAsync.

適用於