Comparing 2 reference strings returns true
<pre><code>string a = "abc";
string b = "abc";
Console.WriteLine(String.ReferenceEquals(a, b));
</code></pre>

<p><code>a</code> and <code>b</code> are CLEARLY different references, yet, I get true. Why is this? Somewhere I've read that when you assign <code>abc</code> to <code>b</code>, the compiler sees that there's already the exact <code>abc</code> value in the heap and points to the same memory address as <code>a</code>, but if this was the case, then by that logic the last line of this code below should print <code>true</code>:</p>

<pre><code>class SomeClass
{
    public int _num;
    public SomeClass(int num)
    {
        _num = num;
    }
}
var a = new SomeClass(3);
var b = new SomeClass(3);
Console.WriteLine(Object.ReferenceEquals(a, b)); // prints false
</code></pre>