XmlWriter.WriteBinHexAsync(Byte[], Int32, Int32) XmlWriter.WriteBinHexAsync(Byte[], Int32, Int32) XmlWriter.WriteBinHexAsync(Byte[], Int32, Int32) XmlWriter.WriteBinHexAsync(Byte[], Int32, Int32) Method

定義

以非同步的方式將指定的二進位位元組編碼為 BinHex 並寫出產生的文字。Asynchronously encodes the specified binary bytes as BinHex and writes out the resulting text.

public:
 virtual System::Threading::Tasks::Task ^ WriteBinHexAsync(cli::array <System::Byte> ^ buffer, int index, int count);
public virtual System.Threading.Tasks.Task WriteBinHexAsync (byte[] buffer, int index, int count);
abstract member WriteBinHexAsync : byte[] * int * int -> System.Threading.Tasks.Task
override this.WriteBinHexAsync : byte[] * int * int -> System.Threading.Tasks.Task
Public Overridable Function WriteBinHexAsync (buffer As Byte(), index As Integer, count As Integer) As Task

參數

buffer
Byte[]

要編碼的位元組陣列。Byte array to encode.

index
Int32 Int32 Int32 Int32

緩衝區中的位置指示要寫入的位元組開頭。The position in the buffer indicating the start of the bytes to write.

count
Int32 Int32 Int32 Int32

要寫入的位元組數。The number of bytes to write.

傳回

表示非同步 WriteBinHex 作業的工作。The task that represents the asynchronous WriteBinHex 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."

備註

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

適用於

另請參閱