M
Matthias Langbein
Hi all,
how do I solve this problem:
Interface A
{...}
Class B : System.Windows.Forms.UserControl, A
{...}
ClassC : System.Windows.Forms.UserControl, A
{...}
Class D : System.Windows.Forms.UserControl
{
A val1 = new B();
A val2 = new C();
.....
this.add(val1);
this.add(val2);
}
Compilation Error because val1/val2 cannot be converted to
UserControl. As far as I know a Interface cannot inherit from a class,
but only extend another inteface. So which Interface can I use so
"this.add(val1)" works??
Thanks a lot,
Langi
how do I solve this problem:
Interface A
{...}
Class B : System.Windows.Forms.UserControl, A
{...}
ClassC : System.Windows.Forms.UserControl, A
{...}
Class D : System.Windows.Forms.UserControl
{
A val1 = new B();
A val2 = new C();
.....
this.add(val1);
this.add(val2);
}
Compilation Error because val1/val2 cannot be converted to
UserControl. As far as I know a Interface cannot inherit from a class,
but only extend another inteface. So which Interface can I use so
"this.add(val1)" works??
Thanks a lot,
Langi