HttpContent.ReadAsByteArrayAsync 方法

定義

以非同步作業方式將位元組陣列的 HTTP 內容序列化。Serialize the HTTP content to a byte array as an asynchronous operation.

public:
 System::Threading::Tasks::Task<cli::array <System::Byte> ^> ^ ReadAsByteArrayAsync();
public System.Threading.Tasks.Task<byte[]> ReadAsByteArrayAsync ();
member this.ReadAsByteArrayAsync : unit -> System.Threading.Tasks.Task<byte[]>
Public Function ReadAsByteArrayAsync () As Task(Of Byte())

傳回

Task<Byte[]>

代表非同步作業的工作物件。The task object representing the asynchronous operation.

備註

這項作業不會封鎖。This operation will not block. 在所有內容都已寫入為位元組陣列之後,傳回的 Task<TResult> 物件將會完成。The returned Task<TResult> object will complete after all of the content has been written as a byte array.

一旦作業完成,傳回之工作物件上的 Result 屬性就會包含具有 HTTP 內容的位元組陣列。Once the operation completes, the Result property on the returned task object contains the byte array with the HTTP content.

適用於