Hi I have the following code
Partial Public Class DT_AnalyseDetail
Private componentField As String
Private contentField As String
Public Property Component() As String
Get
Return Me.componentField
End Get
Set(value As String)
Me.componentField = Value
End Set
End Property
Public Property Content() As String
Get
Return Me.contentField
End Get
Set(value As String)
Me.contentField = Value
End Set
End Property
End Class
Partial Public Class DT_Analyse
Private detailField() As DT_AnalyseDetail
Private batchField As String
Public Property Detail() As DT_AnalyseDetail()
Get
Return Me.detailField
End Get
Set(value As DT_AnalyseDetail())
Me.detailField = value
End Set
End Property
Public Property Batch() As String
Get
Return Me.batchField
End Get
Set(value As String)
Me.batchNoField = Value
End Set
End Property
End Class
Sub()
Dim a_Myana(1) As DT_Analyse
Dim a_Mydet(1) As DT_AnalyseDetail
a_Mydet(0) = New DT_AnalyseDetail
a_Mydet(0).Component = "TEST"
a_Mydet(0).Content= "YES"
a_Myana(0) = New DT_Analyse
a_Myana(0).Batch= "123"
a_Myana(0).Detail(0) = New DT_AnalyseDetail
a_Myana(0).Detail(0) = a_Mydet(0)
End Sub
The Error happens when I want to fill a_Myana(0).Detail(0) = a_Mydet(0) I guess that my Class / array defintions are not correct. But I am not sure how to handle it. Does "Detail" need to have more dimensions? The class defintion was written by visual studios xsd.exe from an xesd file.