I have these classes:
class Foo : Form
where T1, T2 : EventArgs
class MiddleGoo : Foo
class Goo : MiddleGoo
The T2
Type parameter in Foo
class needs to be convertible to EventArgs
. But when you are defining your Boo
class, you aren't including that constraint. Change your Boo
class to this:
class Boo : Foo
where T1 : EventArgs
where Y : EventArgs
Also, you have got a syntax error at the Foo
class declaration. Change it to :
class Foo
where T1 : EventArgs
where T2 : EventArgs