//
    // Returns a completed instance of GenericAsyncResult<R> with the specified result.
    //

    public static IAsyncResult FromResult(AsyncCallback ucallback, object ustate, R result, Exception error,
                                          bool synchCompletion)
    {
        GenericAsyncResult <R> gar = new GenericAsyncResult <R>(ucallback, ustate, synchCompletion);

        gar.TrySet(result, error);
        return(gar);
    }