62,046
社区成员
发帖
与我相关
我的任务
分享
class ResolveDNS
{
IPAddress[] m_arrayIPs;
public void Resolve(string s_host)
{
IPHostEntry ip = Dns.GetHostByName(s_host);
m_arrayIPs = ip.AddressList;
}
public IPAddress this[int nIndex]
{
get
{ return m_arrayIPs[nIndex]; }
}
public int IPLength
{
get
{
return m_arrayIPs.Length;
}
}
}