I have these classes:
class Foo<T1, T2> : Form
where T1, T2 : EventArgs
class MiddleGoo : Foo<X,Y>
class Goo : MiddleGoo
X,Y are just simple classes derived from EventArgs.
I see Goo in designer, but i want to create a class Boo between Foo and Goo like this:
class Boo<T1, Y> : Foo<T1, Y>
where T1 : EventArgs
class MiddleGoo : Boo<X,Y>
class Goo : MiddleGoo
Workaround with middle class doesn't work, any ideas?
EDIT: I meant Y and X are classes like YEventArgs and XEventArgs and my problem is about seeing in designer class Boo when i defined Y as T2 but still want to keep it generic through T1.
EDIT2: I just realized I misspelled something about Y class...
public class Foo<T1, T2> : Form
where T1 : EventArgs
where T2 : EventArgs
{
}
public class Boo<T1> : Foo<T1, MyEventArgs2>
where T1 : EventArgs
{
}
public class MiddleGoo : Boo<MyEventArgs1>
{
}
class Goo : MiddleGoo
{
}
public class MyEventArgs2 : EventArgs
{
}
public class MyEventArgs1 : EventArgs
{
}
And to be clear I just can't see Boo in Designer... ( I can't see MiddleGoo too but i don't need to)