title: C# string.GetHashCode() returns non int result
body: <p>One of my clients had an app crash and i traced it due to this bug/feature i can't really explain.<br>
  The WindowsIdentity.GetCurrent().Name.GetHashCode() returns this string: - ?2097695743<br>
  Yes, that a minus, a space, a question mark and then the actual hash numbers.</p>
  
  <p>This is the code of a simple console app that show the weird behaviour.</p>
  
  <pre><code>static void Main(string[] args)
  {
      Console.WriteLine("From String: string name = WindowsIdentity.GetCurrent().Name");            
      string name = WindowsIdentity.GetCurrent().Name;
      Console.WriteLine("name:                            " + name);
      Console.WriteLine("name.GetHashCode().GetType():    " + name.GetHashCode().GetType());
      Console.WriteLine("name.GetHashCode():              " + name.GetHashCode());
      Console.WriteLine("name.GetHashCode().ToString():   " + name.GetHashCode().ToString());
      Console.WriteLine();
      Console.WriteLine();
      Console.WriteLine("Direct");
      Console.WriteLine("WindowsIdentity.GetCurrent().Name:                           " + WindowsIdentity.GetCurrent().Name);
      Console.WriteLine("WindowsIdentity.GetCurrent().Name.GetHashCode().GetType():   " + WindowsIdentity.GetCurrent().Name.GetHashCode().GetType());
      Console.WriteLine("WindowsIdentity.GetCurrent().Name.GetHashCode():             " + WindowsIdentity.GetCurrent().Name.GetHashCode());
      Console.WriteLine("WindowsIdentity.GetCurrent().Name.GetHashCode().ToString():  " + WindowsIdentity.GetCurrent().Name.GetHashCode().ToString());
      Console.WriteLine();
      Console.WriteLine();
      Console.WriteLine("Press Enter to continue");
      Console.ReadLine();
  }
  </code></pre>
  
  <p>This is the text output:</p>
  
  <pre><code>From String: string name = WindowsIdentity.GetCurrent().Name
  name:                            COMMARC\tje
  name.GetHashCode().GetType():    System.Int32
  name.GetHashCode():              - ?2097695743
  name.GetHashCode().ToString():   - ?2097695743
  
  Direct
  WindowsIdentity.GetCurrent().Name:                           COMMARC\tje
  WindowsIdentity.GetCurrent().Name.GetHashCode().GetType():   System.Int32
  WindowsIdentity.GetCurrent().Name.GetHashCode():             - ?2097695743
  WindowsIdentity.GetCurrent().Name.GetHashCode().ToString():  - ?2097695743
  
  
  Press Enter to continue
  </code></pre>
  
  <p>And this is a picture of the same output:</p>
  
  <p><img src="https://i.stack.imgur.com/b07TK.png" alt="Weird GetHashCode return value"></p>
  
  <p>My question is: How on earth is this possible?</p>
  
  <p>UPDATE: the problem was with the funky windows settings for negative numbers.</p>