title: C# Extend class by adding properties
body: <p>Is it possible in C# to extend a class not by adding only functions but properties. Ex: i have a standard DLL library I am relying on and the vendor does not want to modify it.</p>
  
  <p>Already throughout the code I have used the DataCell class extensively and only now realized that I need to add an extra property to it, as creating a new extension class that inherits from this class just does not look like it would work + a lot of rewriting. </p>
  
  <p>DataCell [metadata]</p>
  
  <pre><code>public class DataCell : Message
  {
  public int Field1;
  public int Field2;
  public DataCell()
  {
   ..
  } 
  ..
  }
  </code></pre>
  
  <p>Basically I want to add a public int Flags;  to this class.    So I can do now without rewriting anything,    (new DataCell).Flags = 0x10;</p>