title: Is object a reference type or value type?
body: <p>I have still doubts about <code>object</code>. It is the primary base class of anything, any class. But is it reference type or value type. Or like which of these acts it? I need to get this clarified. I have difficulty understanding that. </p>
  
  <pre><code>     object obj1 = "OldString";
       object obj2 = obj1;
       obj1 = "NewString";
       MessageBox.Show(obj1 + "   " + obj2);
       //Output is  "NewString   OldString" 
  </code></pre>
  
  <p>In this case it acts like a value type. If object was reference type then why obj2 value is still "OldString"</p>
  
  <pre><code>   class SampleClass
      {
          public string Text { get; set; }
      }
  
      SampleClass Sample1 = new SampleClass();
      Sample1.Text="OldText";         
  
      object refer1 = Sample1;
      object refer2 = refer1;
  
      Sample1.Text = "NewText";
  
      MessageBox.Show((refer1 as SampleClass).Text +  (refer2 as SampleClass).Text);
      //OutPut is "NewText   NewText"   
  </code></pre>
  
  <p>In this case it acts like reference type  </p>
  
  <p>We can deduce that <code>object</code>'s type is what you box inside it. It can be both a reference type and value type. It is about what you box inside. Am I right?</p>