XmlWriter.WriteSurrogateCharEntityAsync(Char, Char) XmlWriter.WriteSurrogateCharEntityAsync(Char, Char) XmlWriter.WriteSurrogateCharEntityAsync(Char, Char) XmlWriter.WriteSurrogateCharEntityAsync(Char, Char) Method

定義

以非同步的方式產生和寫入 Surrogate 字元字組的 Surrogate 字元實體。Asynchronously generates and writes the surrogate character entity for the surrogate character pair.

public:
 virtual System::Threading::Tasks::Task ^ WriteSurrogateCharEntityAsync(char lowChar, char highChar);
public virtual System.Threading.Tasks.Task WriteSurrogateCharEntityAsync (char lowChar, char highChar);
abstract member WriteSurrogateCharEntityAsync : char * char -> System.Threading.Tasks.Task
override this.WriteSurrogateCharEntityAsync : char * char -> System.Threading.Tasks.Task
Public Overridable Function WriteSurrogateCharEntityAsync (lowChar As Char, highChar As Char) As Task

參數

lowChar
Char Char Char Char

低 Surrogate。The low surrogate. 這必須是一個介於 0xDC00 和 0xDFFF 之間的值。This must be a value between 0xDC00 and 0xDFFF.

highChar
Char Char Char Char

高 Surrogate。The high surrogate. 這必須一個是介於 0xD800 和 0xDBFF 之間的值。This must be a value between 0xD800 and 0xDBFF.

傳回

表示非同步 WriteSurrogateCharEntity 作業的工作。The task that represents the asynchronous WriteSurrogateCharEntity operation.

例外狀況

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

-或--or-

在未將 Async 旗標設為 true的情況下呼叫了 XmlWriter 非同步方法。An XmlWriter asynchronous method was called without setting the Async flag to true. 在此情況下,就會擲回 InvalidOperationException 並顯示訊息「如果您要使用非同步方法,請將 XmlWriterSettings.Async 設為 true」。In this case, InvalidOperationException is thrown with the message "Set XmlWriterSettings.Async to true if you want to use Async Methods."

備註

這是非同步的WriteSurrogateCharEntity,使用相同的功能。This is the asynchronous version of WriteSurrogateCharEntity, with the same functionality. 若要使用此方法,您必須設定Async旗標設為trueTo use this method, you must set the Async flag to true.

適用於

另請參閱