The oldest of the asynchronous programming patterns was introduced right from the start, with .NET Framework 1.0. We’ve already covered this pattern in passing in Chapter 17, “Delegates,” and in Chapter 28, “Working with I/O.” Nonetheless, let’s revisit this pattern briefly and identify its core characteristics.
This pattern consists of two related methods, using a
End prefix convention. For example, asynchronous read operations on a
Stream object are defined as follows:
IAsyncResult BeginRead(byte buffer, int offset, int count, AsyncCallback callback, object state);int EndRead(IAsyncResult asyncResult);
BeginRead method takes all the required parameters ...