title: Difference between SystemInformation.ComputerName, Environment.MachineName, and Net.Dns.GetHostName
body: <p>From what I have seen, in the MSDN documentation and in other questions here on SO, there are four ways to get the local machine name. </p>
  
  <pre><code>Environment.MachineName;
  System.Net.Dns.GetHostName();
  System.Windows.Forms.SystemInformation.ComputerName;
  System.Environment.GetEnvironmentVariable("COMPUTERNAME");
  </code></pre>
  
  <p>Is there a differnece in what they methods will return or will they all return the exact same thing all of the time?</p>
  
  <p>Note:
  I first saw the list in this post:
  <a href="https://stackoverflow.com/questions/662282/how-do-i-get-the-local-machine-name">How do I get the local machine Name?</a></p>