XmlWriter.WriteRaw XmlWriter.WriteRaw XmlWriter.WriteRaw XmlWriter.WriteRaw Method

定義

在衍生類別中覆寫時,手動寫入未經處理的標記。When overridden in a derived class, writes raw markup manually.

多載

WriteRaw(String) WriteRaw(String) WriteRaw(String) WriteRaw(String)

在衍生類別中覆寫時,從字串手動寫入未經處理的標記 (Raw Markup)。When overridden in a derived class, writes raw markup manually from a string.

WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32)

在衍生類別中覆寫時,從字元緩衝區手動寫入未經處理的標記。When overridden in a derived class, writes raw markup manually from a character buffer.

備註

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

WriteRaw(String) WriteRaw(String) WriteRaw(String) WriteRaw(String)

在衍生類別中覆寫時,從字串手動寫入未經處理的標記 (Raw Markup)。When overridden in a derived class, writes raw markup manually from a string.

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

參數

data
String String String String

包含要寫入之文字的字串。String containing the text to write.

例外狀況

datanullString.Emptydata is either null or String.Empty.

在先前的非同步作業完成前呼叫了 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."

範例

請參閱XmlTextWriter.WriteRaw如需使用此方法的範例。See XmlTextWriter.WriteRaw for an example using this method.

備註

這個方法不會逸出特殊字元。This method does not escape special characters.

重要

XmlWriter不會驗證資料傳遞至WriteRaw方法。The XmlWriter does not validate the data that is passed to the WriteRaw method. 您不應將任意資料傳遞至這個方法。You should not pass arbitrary data to this method.

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

WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32) WriteRaw(Char[], Int32, Int32)

在衍生類別中覆寫時,從字元緩衝區手動寫入未經處理的標記。When overridden in a derived class, writes raw markup manually from a character buffer.

public:
 abstract void WriteRaw(cli::array <char> ^ buffer, int index, int count);
public abstract void WriteRaw (char[] buffer, int index, int count);
abstract member WriteRaw : char[] * int * int -> unit
Public MustOverride Sub WriteRaw (buffer As Char(), index As Integer, count As Integer)

參數

buffer
Char[]

包含要寫入之文字的字元陣列。Character array containing the text to write.

index
Int32 Int32 Int32 Int32

緩衝區中指示要寫入的文字開頭的位置。The position within the buffer indicating the start of the text to write.

count
Int32 Int32 Int32 Int32

要寫入的字元數。The number of characters to write.

例外狀況

indexcount 小於零。index or count is less than zero.

-或--or- 緩衝區長度減去 index 會小於 countThe buffer length minus index is less than count.

在先前的非同步作業完成前呼叫了 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 does not escape special characters.

重要

XmlWriter不會驗證資料傳遞至WriteRaw方法。The XmlWriter does not validate the data that is passed to the WriteRaw method. 您不應將任意資料傳遞至這個方法。You should not pass arbitrary data to this method.

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

適用於