C# ref Confusion
<p>I have a confusion that when i pass a variable by refrence in the constructor of another class and after passing that object by refrence i recreate the refrence object with the new keyword. </p>

<p>Now the class in which i have passed the refrenced object dosen't reflect the updated data.
An exabple of the above problem is shown below:</p>

<h1>Object to be passed by Refrence:</h1>

<pre><code>public class DummyObject
{
    public string Name = "My Name";

    public DummyObject()
    { }
}
</code></pre>

<h1>Class which is passing the Refrence:</h1>

<pre><code>public partial class Form1 : Form
{
    // Object to be passed as refrence
    DummyObject dummyObject = new DummyObject();

    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        // assigning value
        dummyObject.Name = "I am Dummy";

        // Passing object
        Form2 frm = new Form2(ref dummyObject);
        frm.Show();
    }

    private void button2_Click(object sender, EventArgs e)
    {
        // Displaying Name
        MessageBox.Show(this.dummyObject.Name);
    }

    private void button3_Click(object sender, EventArgs e)
    {
        // Assigning new object
        this.dummyObject = new DummyObject();

        // Changing Name Variable
        this.dummyObject.Name = "I am Rechanged";

        // Displaying Name
        MessageBox.Show(this.dummyObject.Name);
    }
}
</code></pre>

<h1>Class to which Object is passed by Reference:</h1>

<pre><code>public partial class Form2 : Form
{
    private DummyObject dummyObject = null;

    public Form2(ref DummyObject DummyObject)
    {
        InitializeComponent();

        this.dummyObject = DummyObject;
        this.dummyObject.Name = "I am Changed";
    }

    private void button2_Click(object sender, EventArgs e)
    {
        MessageBox.Show(this.dummyObject.Name);
    }
}
</code></pre>

<p>whn i reaasign the object in Form 1 and cdisplay its value in form 2 it still displays "I am Changed" instead of "I am Rechanged".</p>

<p>How to keep the data synchronized?</p>
