SqlFileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
开始异步读取操作。
public:
override IAsyncResult ^ BeginRead(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ callback, System::Object ^ state);
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[]
要将数据读入的缓冲区。
- offset
- Int32
从流中开始写入读取数据的字节偏移量 buffer 。
- count
- Int32
要读取的最大字节数。
- callback
- AsyncCallback
一个可选的异步回调,在读取完成后调用。
- state
- Object
用户提供的对象,用于区分此特定异步读取请求与其他请求。
返回
一个表示异步读取(可能仍在挂起)的一个 IAsyncResult 。
例外
流不支持读取数据。
注解
使用 CanRead 属性确定当前实例是否支持读取。