SqlFileStream.BeginRead Method (Byte[], Int32, Int32, AsyncCallback, Object)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Begins an asynchronous read operation.

Namespace:   System.Data.SqlTypes
Assembly:  System.Data (in System.Data.dll)

[HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading = true)]
public override IAsyncResult BeginRead(
	byte[] buffer,
	int offset,
	int count,
	AsyncCallback callback,
	object state
)

Parameters

buffer
Type: 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: