Following code reflects an attempt to create a class that has a list as its property
Both red statements are flagged with a similar error:
Value of type '1-dimensional array of System.Collections.Generic.List(Of con_AppParmCollection.AppParms.AppParm)' cannot be converted to 'System.Collections.Generic.List(Of con_AppParmCollection.AppParms.AppParm)'.
When I replaced the first red statement with
m_parmbag was flagged with the same error.
Help is appreciated.
_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
Code:
Public Class AppParms
Private m_parmbag() As List(Of AppParm)
Property Parmbag() As List(Of AppParm)
Get
[COLOR=red]Return m_parmbag[/color]
End Get
Set(ByVal value As List(Of AppParm))
[COLOR=red]m_parmbag = value[/color]
End Set
End Property
Public Sub New()
Parmbag() = New List(Of AppParm)
End Sub
Public Class AppParm
Public Property ParmName As String
Public Property ParmValue As String
Public Property ParmDefault As String
Public Property Dirty As Boolean
End Class
End Class
Both red statements are flagged with a similar error:
Value of type '1-dimensional array of System.Collections.Generic.List(Of con_AppParmCollection.AppParms.AppParm)' cannot be converted to 'System.Collections.Generic.List(Of con_AppParmCollection.AppParms.AppParm)'.
When I replaced the first red statement with
Code:
For Each ap As AppParm In m_parmbag
Parmbag.Add(ap)
Next
Help is appreciated.
_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]