?
--
I'm getting a weird error. I've got a class:
public class Editor<C,V> : UserControl where C :
System.Windows.Forms.Control
that's kind of a wrapper around the control C, where C will be of type
TextBox, ComboBox, etc. and V is the type of the thing being edited.
When I try to inherit from it:
public class TextBoxEditor : Editor<System.Windows.Forms.TextBox,
String>
genasm.exe is telling me:
genasm.exe(1) : error There was an error initializing
xxx.TextBoxEditor. GenericArguments[0],
'System.Windows.Forms.TextBox', on xxx.Editor`2[C,V]' violates the
constraint of type 'C'.
Now, I'm pretty certain TextBox is a decedent of Control.
I've looked around and haven't seem this problem before. Any one have
any ideas what's going on?
public class Editor<C,V> : UserControl where C :
System.Windows.Forms.Control
that's kind of a wrapper around the control C, where C will be of type
TextBox, ComboBox, etc. and V is the type of the thing being edited.
When I try to inherit from it:
public class TextBoxEditor : Editor<System.Windows.Forms.TextBox,
String>
genasm.exe is telling me:
genasm.exe(1) : error There was an error initializing
xxx.TextBoxEditor. GenericArguments[0],
'System.Windows.Forms.TextBox', on xxx.Editor`2[C,V]' violates the
constraint of type 'C'.
Now, I'm pretty certain TextBox is a decedent of Control.
I've looked around and haven't seem this problem before. Any one have
any ideas what's going on?