title: Up casting - c#
body: <pre><code>public class a{
    public string x1 {get;set;}
    public string x2 {get;set;}
    public string x3 {get;set;}
  }
  
  public class b:a{
  }
  </code></pre>
  
  <p>Obviously  <code>var foo = (b)new a();</code> will throw a casting error at runtime.</p>
  
  <p>The only other way I can think to assign all the properties of an already instantiated and populated <code>a</code> is to manually copy each one over into a fresh instance of <code>b</code>.</p>
  
  <p>Is this correct?</p>