public override int EndRead(IAsyncResult ar) { try { object result = ((LazyAsyncResult)ar).InternalWaitForCompletion(); if (result is Exception) throw (Exception)result; return (int)result; } finally { CheckError(); } }