In one of my projects, I use an abstract UserControl. To create this control in Visual Studio, I use the code suggested in this answer . Now I want to use this with another abstract UserControl, which is also shared. But if I do
[TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider<MyBaseControl<T>, UserControl>))]
I get a compiler error
CS0416: attribute argument cannot use type parameters
Deleting a type parameter obviously also does not compile.
I cannot derive MyBaseControl from a non-generic base class, because it is already derived from the base base class, so I tried to decorate it with an interface and use it like this:
[TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider<IMyBaseControl, UserControl>))]
, , ,
.
?