Encapsulates the data for an event that is raised when an asynchronous read operation completes.
public class OpenReadCompletedEventArgs : EventArgs
The OpenReadCompletedEventArgs class holds the result of an asynchronous
operation to open a stream for reading a resource. This class is used with the
OpenReadCompleted event of the WebClient class.
When an OpenReadAsync method call completes, the
OpenReadCompleted event is raised. The event handler for this event
receives an instance of OpenReadCompletedEventArgs.
You can use the properties of the OpenReadCompletedEventArgs object to
determine if the operation was successful, to get the resulting stream, or to
retrieve any error that occurred.
public OpenReadCompletedEventArgs (Stream? result, Exception? error, bool cancelled, object? userState);
true if the operation was canceled; otherwise, false.
public Stream? Result { get; }
null.
public Exception? Error { get; }
null.
public bool Cancelled { get; }
public object? UserState { get; }