A
Angel Mateos
I have this structure:
Class ElemBase
Class Elem1 : Inherits ElemBase
Class ColecBase(Of GenElem As {ElemBase, New}) : Inherits
System.ComponentModel.BindingList(Of GenElem)
Class Colec1 : Inherits ColecBase(Of Elem1)
Class Class1
Public E As ElemBase
Public C As ColecBase(Of ElemBase)
End Class
Class Class2
Dim ColH As Colec1
Dim Cl1 As Class1
Sub proc()
Cl1.C = ColH
End Sub
End Class
I get an error in sub proc because Colect1 can't be converted to
ColecBase(of ElemBase)
there is a way to do this?
Thanks
Class ElemBase
Class Elem1 : Inherits ElemBase
Class ColecBase(Of GenElem As {ElemBase, New}) : Inherits
System.ComponentModel.BindingList(Of GenElem)
Class Colec1 : Inherits ColecBase(Of Elem1)
Class Class1
Public E As ElemBase
Public C As ColecBase(Of ElemBase)
End Class
Class Class2
Dim ColH As Colec1
Dim Cl1 As Class1
Sub proc()
Cl1.C = ColH
End Sub
End Class
I get an error in sub proc because Colect1 can't be converted to
ColecBase(of ElemBase)
there is a way to do this?
Thanks