C# 局域网通过Ip怎么获取远程电脑的计算机名称和别名
C# 局域网通过Ip获取远程电脑的计算机名称和别名
获取计算机名称
string name1= System.Net.Dns.GetHostByAddress("192.168.1.64").HostName.ToString();
获取计算机别名
string name2= System.Net.Dns.GetHostByAddress("192.168.1.64").Aliases[0].ToString()
获取计算机名称
string name1= System.Net.Dns.GetHostByAddress("192.168.1.64").HostName.ToString();
获取计算机别名
string name2= System.Net.Dns.GetHostByAddress("192.168.1.64").Aliases[0].ToString()