title: Accessing derived class property members from base class object in CSharp
body: <p>I am having trouble accessing property members of derived class using base class object.</p>
  
  <p>Scenario:</p>
  
  <pre><code>public class BaseClass{
      public virtual Write(BaseClass data){
      }
  }
  
  public class DerivedClass : BaseClass{
  
      private string name:
  
      public string Name {get {return name} set {name = value;} }
  
      public override Write(BaseClass data){
       Console.println(data.Name);  // gives me error here
      }
  
  }
  </code></pre>