title: How can I refactor a simple class member to a more complex type?
body: <p>I have a little class</p>
  
  <pre><code>public class ExcitingResults
  {
      public int A { get; set; }
      public string B { get; set; }
      public DateTime C { get; set; }
  
      public string ComplexD
      {
          get { return SomeMethod("A", "B"); }
      }
  }
  </code></pre>
  
  <p>Currently I do some processing with results a <code>List&lt;ExcitingResults&gt;</code> that creates JSON or Excel files.
  This processing relies strongly on the name of each property and the order that things appear in the output is defined by the order they appear in the class. Though in fact this is undefined behaviour and so could change if the compiler decides it wants things in a different order.</p>
  
  <p>For this reason I would like to alter my class to something like this.</p>
  
  <pre><code>public class ExcitingResults
  {
      public column&lt;int&gt; A { get; set; }
      public column&lt;string&gt; B { get; set; }
      public column&lt;DateTime&gt; C { get; set; }
  
      public column&lt;string&gt; ComplexD
      {
          get { return SomeMethod(A.Name, B.Name); }
      }
  }
  
  public class column&lt;T&gt;
  {
      public T Value { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>Clearly this is not a drop in replacement... is there some clever strategy I can take to make this change as painless as possible. Then in the future add complexity to the <code>Column</code> class such as order, friendly names and other attributes as they occur to me.</p>
  
  <p>Or is this a crazy way forwards and I should be looking at another strategy to be able to add this extra information to the columns?</p>