I have a class in dll which looks as follows
// Summary:
// View component Builder base class.
public abstract class WidgetBuilderBase<TViewComponent, TBuilder> : IHtmlString, IHideObjectMembers
where TViewComponent : global::Kendo.Mvc.UI.WidgetBase
where TBuilder : global::Kendo.Mvc.UI.Fluent.WidgetBuilderBase<TViewComponent, TBuilder>
{
}
i want to inherit this class in my following class
public abstract class WidgetBuilderBase<TViewComponent, TBuilder>
I surf on net but most on the site i didn't get satisfactory answer most of it says we can not inherit the generic class. why it is not possible to inherit the generic class.
I am trying to do following code
public abstract class WidgetBuilderBase<TViewComponent, TBuilder> : Kendo.Mvc.UI.Fluent.WidgetBuilderBase<TViewComponent, TBuilder>
{
}
But it gives me following error.
The type 'TBuilder' cannot be used as type parameter 'TBuilder' in the generic type or method 'Kendo.Mvc.UI.Fluent.WidgetBuilderBase'. There is no boxing conversion or type parameter conversion from 'TBuilder' to 'Kendo.Mvc.UI.Fluent.WidgetBuilderBase'.
same error for TViewComponent. How to solve this problem... :(
Any help on inheriting generic class?