XmlReader.ReadContentAsBinHexAsync(Byte[], Int32, Int32) 方法

定義

以非同步的方式讀取內容,並傳回 BinHex 的解碼二進位位元組。

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

參數

buffer
Byte[]

將產生的文字複製到其中的緩衝區。 這個值不能是 null

index
Int32

緩衝區中開始複製結果的位移。

count
Int32

要複製至緩衝區中的最大位元組數目。 從這個方法傳回所複製的實際位元組數目。

傳回

Task<Int32>

寫入緩衝區的位元組數目。

例外狀況

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

-或-

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

備註

這是 的非同步版本 ReadContentAsBinHex ,具有相同的功能。 若要使用這個方法,您必須將 Async 旗標設定為 true

適用於

另請參閱