public override int EndRead(IAsyncResult asyncResult)
{
if (asyncResult == null)
throw new ArgumentNullException("asyncResult");
LazyAsyncResult ar = (LazyAsyncResult) asyncResult;
if (ar.EndCalled) throw new InvalidOperationException(SR.GetString(SR.net_io_invalidendcall, "EndRead"));
ar.EndCalled = true;
return (int)ar.InternalWaitForCompletion();
}