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();