J
Joe
Hi All!
Here's the problem I'm having. I want to create a generic class that
inherits from CollectionBase and implements IBindingList. As part of
IBindingList I have to implement AddNew(). Since this is a generic class the
new throws an error "Cannot create an instance of the variable type 'T'
because it does not have the new constraint".
How do I add a constraint to my class and be able to keep the CollectionBase
and IBindingList?
When I add the where <T>: it means that I want the class T to implement
CollectionBase and IBindingList.
Is it possible to do what I want?
Thanks,
Joe
Here's the problem I'm having. I want to create a generic class that
inherits from CollectionBase and implements IBindingList. As part of
IBindingList I have to implement AddNew(). Since this is a generic class the
new throws an error "Cannot create an instance of the variable type 'T'
because it does not have the new constraint".
How do I add a constraint to my class and be able to keep the CollectionBase
and IBindingList?
When I add the where <T>: it means that I want the class T to implement
CollectionBase and IBindingList.
Is it possible to do what I want?
Thanks,
Joe