ZLibStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) Metodo

Definizione

Inizia un'operazione di lettura asincrona.

public:
 override IAsyncResult ^ BeginRead(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ asyncCallback, System::Object ^ asyncState);
public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState);
override this.BeginRead : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginRead (buffer As Byte(), offset As Integer, count As Integer, asyncCallback As AsyncCallback, asyncState As Object) As IAsyncResult

Parametri

buffer
Byte[]

Matrice di byte in cui leggere i dati.

offset
Int32

Offset dei byte in buffer da cui iniziare la lettura dei dati dal flusso.

count
Int32

Numero massimo di byte da leggere.

asyncCallback
AsyncCallback

Callback asincrono facoltativo, da chiamare quando l'operazione di lettura è completa.

asyncState
Object

Oggetto fornito dall'utente che distingue questa specifica richiesta di lettura asincrona da altre richieste.

Restituisce

Oggetto che rappresenta l'operazione di lettura asincrona, che può essere ancora in sospeso.

Eccezioni

buffer è null.

offset è minore di zero.

-oppure-

offset e count sono stati fuori limiti per la matrice.

-oppure-

count è maggiore del numero di elementi compresi tra offset e la fine di buffer.

Si applica a