H
Harold Howe
Howdy all.
Is it possible to use a generic argument as a base class? Based on the
error that I am getting, I think the answer is no.
public class Test<T> : T
{
}
main.cs(5,24): error CS0689: Cannot derive from 'T' because it is a type
parameter
This feature would be most useful, particularly in the design of a class
library. It would allow users to inject different behaviors into the
leaf classes in the hierarchy.
H^2
Is it possible to use a generic argument as a base class? Based on the
error that I am getting, I think the answer is no.
public class Test<T> : T
{
}
main.cs(5,24): error CS0689: Cannot derive from 'T' because it is a type
parameter
This feature would be most useful, particularly in the design of a class
library. It would allow users to inject different behaviors into the
leaf classes in the hierarchy.
H^2