C
Chuck Cobb
I just discovered the hard way that the Visual Studio designer for forms and
controls does not support generics.
I created the following controls:
Base Class:
public partial class CtlDataGrid<CollectionClass, InfoClass> : CtlBase
where CollectionClass : BaseCollection<InfoClass>
where InfoClass : BaseInfo
{
Primary Class:
public partial class CtlConsultantDatabase :
CtlDataGrid<ConsultantCollection, ConsultantInfo>
Everything works fine...the application compiles and runs fine, but when I
attempt to open the primary control in the designer, I get an error that
says the base control cannot be built.
Is there a work-around for this problem? Is there a plan to support
generics with forms and controls in the future?
Thanks,
Chuck Cobb
controls does not support generics.
I created the following controls:
Base Class:
public partial class CtlDataGrid<CollectionClass, InfoClass> : CtlBase
where CollectionClass : BaseCollection<InfoClass>
where InfoClass : BaseInfo
{
Primary Class:
public partial class CtlConsultantDatabase :
CtlDataGrid<ConsultantCollection, ConsultantInfo>
Everything works fine...the application compiles and runs fine, but when I
attempt to open the primary control in the designer, I get an error that
says the base control cannot be built.
Is there a work-around for this problem? Is there a plan to support
generics with forms and controls in the future?
Thanks,
Chuck Cobb