I am trying to make a shell using inheritance. I actually work with a de-serialization code that has very common names, and I want to save a few keystrokes on a method that wraps an internal object.
public class Base { public string Foo { get; set; } } public class Derived : Base { public string Bar { get { return this.Foo; } } } Base base = new Base(); Derived d = (Derived)base;
I get an error message that is trying to compress. Is this possible in C #? There is no extra data in the derived class, so my C ++ brain tells me that downgrade is possible ...
source share