I am trying to find a way to derive a class from a generic base class. Say:
sealed public class Final : Base
{
}
public class Base
You could only do this if Final
would be a generic class as well, like so:
public sealed class Final : Base
Then you can put a type restraint on T
as either a class
, to allow only reference types as T
, or an instance of Base
, to allow only types that derive from Base
:
public class Base where T : Base