title: Why string pointer position is different?
body: <p>Why string pointer position is different each time I ran the application, when I'm using <code>StringBuilder</code> but same when I declare a variable?</p>
  
  <pre><code>void Main()
  {
      string str_01 = "my string";
      string str_02 = GetString();
      unsafe 
      {
          fixed (char* pointerToStr_01 = str_01)
          {
              fixed (char* pointerToStr_02 = str_02)
              {
                  Console.WriteLine((Int64)pointerToStr_01);
                  Console.WriteLine((Int64)pointerToStr_02);
              }
          }
      }
  }
  
  private string GetString()
  {
      StringBuilder sb = new StringBuilder();
      sb.Append("my string");
  
      return sb.ToString();
  }
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <p>40907812 <br />
    178488268</p>
  </blockquote>
  
  <p>next time:</p>
  
  <blockquote>
    <p>40907812 <br />
    179023248</p>
  </blockquote>
  
  <p>next time:</p>
  
  <blockquote>
    <p>40907812 <br />
    178448964</p>
  </blockquote>