I am trying to pass a list of custom items to a form and having some issues
this is the form cunstructor
Public Class frmSelectDisplayColumns
Public Sub New(ByVal DCs As List(Of CacheDisplayColumn))
'The Base Class of my Objects
<System.Serializable()> Partial Public MustInherit Class CacheDisplayColumn
'The Super classes of my Object
<System.Serializable()> Public Class PriceDisplayColumn
<System.Serializable()> Public Class ItemDisplayColumn
'and the calling code
Private myIDCs As New List(Of ItemDisplayColumn)
Public Sub Choose_Columns()
Dim f As New frmSelectDisplayColumns(Me.myIDCs)
This throws an error on the line ; Dim f As New frmSelectDisplayColumns(Me
Value of type 'System.Collections.Generi
c.List(Of ...ItemDisplayColumn)' cannot be converted to 'System.Collections.Generi
I also tried making an Interface for and implementing it in the base class "cachedisplaycolumn" and changing the form constructor to accept a list of that interface and received the same conversion error [except for the interface instead of the base class)
I believe i could ask for a list of Object and then recast in the form constructor.
of create a base class list before calling the form constructor but those both seem dirty and i thought one of the points to interfaces and base classes was for situations like this.
so i think i am missing something here. and i am hoping you experts can shine some light for me.