title: Cast base instance to derived class (downcast) in C#
body: <p>Suppose I have two classes:</p>
  
  <pre><code>class Employee 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class AdvancedEmployee:Employee
  </code></pre>
  
  <p>I know something like this won't work, as I can't downcast on C#:</p>
  
  <pre><code>var employee = new Employee();
  var advanced = employee as AdvancedEmployee;
  </code></pre>
  
  <p>My question is: How to accomplish downcast in a efficient way? 
  Actually I have a constructor on AdvancedEmployee that takes a Employee as parameter and use it to inject its values, basically making a clone.</p>
  
  <hr>
  
  <p>Update</p>
  
  <p>To solve the data that would get duplicated I changed the approach a bit and now AdvancedEmployee CONTAINS an employee rather than being one itself.
  Example: </p>
  
  <pre><code>class Employee;
  
  class AdvancedEmployee
  {
     private employee
  
     public AdvancedEmployee(Employee employee){
  
      this.employee = employee
  
    }           
  
  }
  </code></pre>