Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SqlFileStream::BeginRead Method (array<Byte>^, Int32, Int32, AsyncCallback^, Object^)

 

Begins an asynchronous read operation.

Namespace:   System.Data.SqlTypes
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.

Use the CanRead property to determine whether the current instance supports reading.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft