Why does string equality compares characters?
<p>I am just a bit confused with strings, and their comparison.
What I understand is that doing this :</p>

<pre><code>string one = "stackoverflow";
string two = "stackoverflow";

bool equal = one == two;
</code></pre>

<p>This will compare character by character right?</p>

<p>Why is this the case? if string are immutable, and two variables will always refer to the same string if they have equal characters. Why doesn't the compiler just checks the references?
If there is one place where I would think that references equality means value equality I would think that would be for strings. What am I missing?</p>
