以下名称返回machine.domain.suffix,例如mymachine.mydomain.local
System.Net.Dns.GetHostByName("LocalHost").HostName;我只想获得'mydomain.local‘(以dfs命名空间为目标)。
有比使用子字符串更干净的方法吗?
发布于 2017-01-04 13:56:37
如前所述,here System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().DomainName;
https://stackoverflow.com/questions/41464580
复制相似问题