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

Definizione

Avvia 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 di byte in in buffer corrispondenza del quale iniziare la lettura dei dati dal flusso.

count
Int32

Numero massimo di byte da leggere.

asyncCallback
AsyncCallback

Callback asincrono facoltativo da chiamare al termine dell'operazione di lettura.

asyncState
Object

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

Valori restituiti

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

Eccezioni

buffer è null.

offset è minore di zero.

oppure

offset e count non erano limiti per la matrice.

oppure

count è maggiore del numero di elementi da offset alla fine di buffer.

Si applica a