I have an asbtract class. Another common UsesExample class uses it as a constraint, with a new () constraint. Later I create a child in the Example, ExampleChild class and use it with a generic class. But for some reason, when the code in the generic class tries to create a new copy, it does not call the constructor in the child class, but the constructor in the parent class. Why is this happening? Here is the code:
abstract class Example { public Example() { throw new NotImplementedException ("You must implement it in the subclass!"); } } class ExampleChild : Example { public ExampleChild() {
source share