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

SyncMemoryStream.BeginRead 方法

定义

开始异步读操作。

public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state);
override this.BeginRead : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginRead (buffer As Byte(), offset As Integer, count As Integer, callback As AsyncCallback, state As Object) As IAsyncResult

参数

buffer
Byte[]

此方法返回时,该缓冲区包含指定的字节数组,该数组的偏移量和(偏移量 + 计数 - 1)之间的值由从当前源中读取的字节替换。

offset
Int32

缓冲区中从零开始的字节偏移量,从此处开始存储从当前流中读取的数据。

count
Int32

要读取的最多字节数。

callback
AsyncCallback

可选的异步回调,在完成读取时调用。

state
Object

一个用户提供的对象,它将该特定的异步读取请求与其他请求区别开来。

返回

表示异步读取的 IAsyncResult,该读取可能仍处于挂起状态。

适用于