System.Net.IPAddress addr;
//获取IP
addr = new System.Net.IPAddress ( Dns.GetHostByName ( Dns.GetHostName ( ) ) .AddressList [0].Address ) ; return addr.ToString ( ) ;
//获取PCname
string pcname=Dns.GetHostName();
System.Net.IPAddress addr;
//获取IP
addr = new System.Net.IPAddress ( Dns.GetHostByName ( Dns.GetHostName ( ) ) .AddressList [0].Address ) ; return addr.ToString ( ) ;
//获取PCname
string pcname=Dns.GetHostName();