public static IPAddress [] EndGetHostAddresses (IAsyncResult asyncResult)
{
if (asyncResult == null)
throw new ArgumentNullException ("asyncResult");
AsyncResult async = (AsyncResult) asyncResult;
GetHostAddressesCallback cb = (GetHostAddressesCallback) async.AsyncDelegate;
return cb.EndInvoke(asyncResult);
}