SqlFileStream::BeginRead Method (array<Byte>^, Int32, Int32, AsyncCallback^, Object^)
Begins an asynchronous read operation.
Assembly: System.Data (in System.Data.dll)
public: [HostProtectionAttribute(SecurityAction::LinkDemand, ExternalThreading = true)] virtual IAsyncResult^ BeginRead( array<unsigned char>^ buffer, int offset, int count, AsyncCallback^ callback, Object^ state ) override
Parameters
- buffer
-
Type:
array<System::Byte>^
The buffer to read the data into.
- offset
-
Type:
System::Int32
The byte offset in buffer at which to begin writing data read from the stream.
- count
-
Type:
System::Int32
The maximum number of bytes to read.
- callback
-
Type:
System::AsyncCallback^
An optional asynchronous callback, to be called when the read is complete.
- state
-
Type:
System::Object^
A user-provided object that distinguishes this particular asynchronous read request from other requests
Return Value
Type: System::IAsyncResult^An IAsyncResult that represents the asynchronous read, which could still be pending.
| Exception | Condition |
|---|---|
| NotSupportedException | Reading data is not supported on the stream. |
Available since 2.0