public new static T End(IAsyncResult result) { if (!(result is TypedCompletedAsyncResult <T> completedResult)) { throw new ArgumentException("InvalidAsyncResult"); } return(TypedAsyncResult <T> .End(completedResult)); }
public new static T End(IAsyncResult result) { TypedCompletedAsyncResult <T> completedResult = result as TypedCompletedAsyncResult <T>; if (completedResult == null) { throw new ArgumentException("InvalidAsyncResult"); } return(TypedAsyncResult <T> .End(completedResult)); }