title: Copying the contents of a base class from a derived class
body: <p>I currently have a derived class and a base class. How can I make the base class of the derived class equal to a base class that I have?  Will a shallow copy work?</p>
  
  <pre><code>class Base
  {
      private string name; 
      public string Name { get; set; }
      private string address; 
      public string Address { get; set; }
  }
  
  class Derived:Base
  {
      private string field; 
      public String field { get; set; }
  }
  
  namespace ConsoleApplication1
  {
      class Program
      {
          static void Main(string[] args)
          {
              Base b = new Base();
              b.Address = "Iliff";
              b.Name = "somename"; 
  
              Derived d = new Derived();
              //How can I make the base class of d equal to b ?
  
          }
      }
  }
  </code></pre>