Why reference types inside structs behave like value types?
<p>I am a beginner to C# programming. I am now studying <code>strings</code>, <code>structs</code>, <code>value types</code> and <code>reference types</code>. As accepted answers in <a href="https://stackoverflow.com/questions/636932/in-c-why-is-string-a-reference-type-that-behaves-like-a-value-type">here</a> and in <a href="https://stackoverflow.com/questions/1069155/is-string-a-value-type-or-a-reference-type">here</a>, <code>strings</code> are reference types that have pointers stored on stack while their actual contents stored on heap. Also, as claimed in <a href="https://msdn.microsoft.com/en-us/library/ah19swz4.aspx" rel="noreferrer">here</a>, <code>structs</code> are value types. Now I try to practice with <code>structs</code> and <code>strings</code> with a small example:</p>

<pre><code>struct Person
{
    public string name;
}

class Program
{
    static void Main(string[] args)
    {
        Person person_1 = new Person();
        person_1.name = "Person 1";

        Person person_2 = person_1;
        person_2.name = "Person 2";

        Console.WriteLine(person_1.name);
        Console.WriteLine(person_2.name);
    }
}
</code></pre>

<p>The above code snippet outputs</p>

<pre><code>Person 1
Person 2
</code></pre>

<p>that makes me confused. If <code>strings</code> are reference types and <code>structs</code> are value types then person_1.name and person_2.name should point to the same space region on heap, shouldn't them?</p>