title: Copy a class to another?
body: <p>I have</p>
  
  <pre><code>class A
  {
      public int a;
      public string b;
  }
  </code></pre>
  
  <p>How can i copy A to another A? In C++ i know i could do <code>*a1 = *a2;</code>. Is there something similar in C#? I know i could write a generic solution using reflection but i hope something exist already.</p>
  
  <p>I'm considering changing A to a nullable struct.</p>
  
  <p>Step 2 i'll need to do</p>
  
  <pre><code>class B : A {}
  class C : A {}
  </code></pre>
  
  <p>and copy the base data from B to C.</p>