MSDN 설명서 및 여기에있는 다른 질문에서 로컬 컴퓨터 이름을 가져 오는 네 가지 방법이 있습니다.SystemInformation.ComputerName, Environment.MachineName 및 Net.Dns.GetHostName의 차이점
Environment.MachineName;
System.Net.Dns.GetHostName();
System.Windows.Forms.SystemInformation.ComputerName;
System.Environment.GetEnvironmentVariable("COMPUTERNAME");
differnece는 방법이 반환됩니다 무엇에 있는가 또는 그들 모두는 모든 시간을 정확히 똑같은 일을 반환합니다?
참고 : How do I get the local machine Name?
는'System.Environment.GetEnvironmentVariable ("컴퓨터 이름")는 '환경 변수 컴퓨터 이름은 NetBIOS를 사용으로 설정되지 않고 무엇을 반환하지 않습니다? 환경 변수는 코드에서 아주 쉽게 조작 할 수 있으므로 NetBIOS에서보고 된 것과 다른 값으로 설정할 수 있습니다. – StarPilot