public static IAsyncResult BeginGetHostAddresses (string hostNameOrAddress,
AsyncCallback requestCallback, object stateObject)
{
if (hostNameOrAddress == null)
throw new ArgumentNullException ("hostName");
if (hostNameOrAddress == "0.0.0.0" || hostNameOrAddress == "::0")
throw new ArgumentException ("Addresses 0.0.0.0 (IPv4) " +
"and ::0 (IPv6) are unspecified addresses. You " +
"cannot use them as target address.",
"hostNameOrAddress");
GetHostAddressesCallback c = new GetHostAddressesCallback (GetHostAddresses);
return c.BeginInvoke (hostNameOrAddress, requestCallback, stateObject);
}