Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Support For Generics in Forms and Controls

0 views
Skip to first unread message

Chuck Cobb

unread,
Apr 13, 2006, 2:20:37 PM4/13/06
to
I discovered the hard way that the Visual Studio Designer apparently doesn't
support generics. I created some controls as follows:

Base Control:
public partial class CtlDataGrid<CollectionClass, InfoClass> : CtlBase
where CollectionClass : BaseCollection<InfoClass>
where InfoClass : BaseInfo
{

Primary Control:
public partial class CtlClientManagerDatabase :
CtlDataGrid<ClientManagerCollection, ClientManagerInfo>

It compiles fine and my application works, but when I try to open the
primary control in the designer, it gives me an error that says that the
base control cannot be built.

Are there any plans to resolve this situation in the future? Are there any
work-arounds for using generics with controls and forms??

Thanks,

Chuck Cobb


0 new messages