XmlDictionaryWriter.WriteBase64Async(Byte[], Int32, Int32) 方法

定義

以非同步的方式將指定的二進位位元組編碼為 base64 並寫出產生的文字。

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

參數

buffer
Byte[]

要編碼的位元組陣列。

index
Int32

緩衝區中的位置指示要寫入的位元組開頭。

count
Int32

要寫入的位元組數。

傳回

表示非同步 WriteBase64 作業的工作。

例外狀況

在先前的非同步作業完成前呼叫了 XmlDictionaryWriter 方法。 在此情況下,會擲回 InvalidOperationException 與「非同步作業已經在進行中」的訊息。

-或-

在未將 Async 旗標設為 true的情況下呼叫了 XmlDictionaryWriter 非同步方法。 在此情況下,就會擲回 InvalidOperationException 並顯示訊息「如果您要使用非同步方法,請將 XmlWriterSettings.Async 設為 true」。

備註

若要使用這個方法,您必須將 Async 旗標設定為 true

適用於

另請參閱