title: Does string comparison == only work because strings are immutable?
body: <p>I had a thought before when comparing two strings with their variables:</p>
  
  <pre><code>string str1 = "foofoo";
  string strFoo = "foo";
  string str2 = strFoo + strFoo;
  
  // Even thought str1 and str2 reference 2 different
  //objects the following assertion is true.
  
  Debug.Assert(str1 == str2);
  </code></pre>
  
  <p>Is this purely because the .NET runtime recognises the string's value is the same and because strings are immutable makes the reference of <code>str2</code> equal to that of <code>str1</code>?</p>
  
  <p>So when we do <code>str1 == str2</code> we are <em>actually</em> comparing references and <strong>not the values</strong>? I originally thought this was the product of syntactic sugar, but was I being incorrect?</p>
  
  <p>Any inaccuracies with what I've written?</p>