title: How can I use reflection to change properties with missing setters?
body: <p>I have two classes with property getters only</p>
  
  <pre><code>public class A 
  {
      public A(string name) 
      {
          Name = name;
      }
      public string Name { get; }
      public string Value { get; set;}
      public string Data { get; set;}
  }
  
  public class B
  {
      public B(string name) 
      {
          Name = name;
      }
      public string Name { get; }
      public string Value { get; set;}
  }
  </code></pre>
  
  <p>They are different in shape but share some of the same property names and types.
  How can I copy values when they only have getters?</p>
  
  <p>This is a typical scenario when I send an object as a constructor parameter to extract values from in the new object. Then I need to copy values one by one. This can produce lots of code and is hard to maintain.</p>
  
  <p>Can this be made simpler? Is there a way to use reflection to copy objects when the target only has getter properties?</p>