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.
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.
DataCell [metadata]
public class DataCell : Message
{
public int Field1;
public int Field2;
public DataCell()
{
..
}
..
}
Basically I want to add a public int Flags; to this class. So I can do now without rewriting anything, (new DataCell).Flags = 0x10;