你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

OutputFileReference.DownloadToByteArrayAsync 方法

定义

将文件的内容下载到字节数组中。

public System.Threading.Tasks.Task<int> DownloadToByteArrayAsync (byte[] target, int index, System.Threading.CancellationToken cancellationToken = default);
member this.DownloadToByteArrayAsync : byte[] * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Function DownloadToByteArrayAsync (target As Byte(), index As Integer, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)

参数

target
Byte[]

目标字节数组。

index
Int32

字节数组中的起始偏移量

cancellationToken
CancellationToken

一个 CancellationToken ,用于控制异步操作的生存期。

返回

读入缓冲区中的总字节数。

适用于

另请参阅