C# - Reference type still needs pass by ref?
<p>Consider the following code (for simplicity, i did not follow any C# coding rules).</p>

<pre><code>public class Professor
{
    public string _Name;

    public Professor(){}

    public Professor(string name)
    {
        _Name=name;
    }

    public void Display()
    {
        Console.WriteLine("Name={0}",_Name);
    }
}

public class Example
{
    static int Main(string[] args)
    {
        Professor david = new Professor("David");

        Console.WriteLine("\nBefore calling the method ProfessorDetails().. ");
        david.Display();
        ProfessorDetails(david);
        Console.WriteLine("\nAfter calling the method ProfessorDetails()..");
        david. Display();
    }

    static void ProfessorDetails(Professor p)
    {
        //change in the name  here is reflected 
        p._Name="Flower";

        //Why  Caller unable to see this assignment 
        p=new Professor("Jon");
    }
}
</code></pre>

<p><hr /></p>

<p>As expected the output is :</p>

<blockquote>
  <p>Before calling the method ProfessorDetails()...</p>
  
  <p>Name =David </p>
  
  <p>After calling the method ProfessorDetails()...</p>
  
  <p>Name =Flower </p>
</blockquote>

<p>The call  <code>p=new Professor("Jon");</code> in <code>ProfessorDetails(Professor p)</code> is not effective,  even though it is reference type. Why should i still need to use the <code>ref</code> keyword to get the desired result?</p>
