Hi!
I have som auto generated (from xsd file, xsd.exe is used) Partial classes.
On of the properties is an arry, her is the code:
Partial Public Class Betaleregrp4900
Private oversiktOverBetaleregrp4899Field() As OversiktOverBetaleregrp4899
Private betalingTotaldatadef21821Field As BetalingTotaldatadef21821
Private betalerAntalldatadef21822Field As BetalerAntalldatadef21822
Private gruppeidField As String
Public Sub New()
MyBase.New
Me.gruppeidField = "4900"
End Sub
'''<remarks/>
<System.Xml.Serialization.XmlElementAttribute("OversiktOverBetalere-grp-
4899")> _
Public Property OversiktOverBetaleregrp4899() As
OversiktOverBetaleregrp4899()
Get
Return Me.oversiktOverBetaleregrp4899Field
End Get
Set
Me.oversiktOverBetaleregrp4899Field = value
End Set
End Property
This property is an array:
Private oversiktOverBetaleregrp4899Field() As OversiktOverBetaleregrp4899
I can write:
Skjema_Obj.Betaleregrp4900.OversiktOverBetaleregrp4899 = New
OversiktOverBetaleregrp4899() { _
New OversiktOverBetaleregrp4899, _
New OversiktOverBetaleregrp4899}
But my problem is, I don't know how many elements of the type
OversiktOverBetaleregrp4899 I have to create and then I do not know how many
New OversiktOverBetaleregrp4899 I need between {}.
I need to use an loop that generats the number of New
OversiktOverBetaleregrp4899 I need, but how can I do that? Is there another
way to do this?
Her is the start of the code for the partial class
OversiktOverBetaleregrp4899
Partial Public Class OversiktOverBetaleregrp4899
Private betalerFodselsnummerdatadef2305Field As
BetalerFodselsnummerdatadef2305
Private betalerOrganisasjonsnummerdatadef21820Field As
BetalerOrganisasjonsnummerdatadef21820
Private betalerNavndatadef2303Field As BetalerNavndatadef2303
Private betalerAdressedatadef2304Field As BetalerAdressedatadef2304
Private betalerPostnummerdatadef11795Field As
BetalerPostnummerdatadef11795
Private betalerPoststeddatadef11796Field As BetalerPoststeddatadef11796
Private betalingBelopdatadef2307Field As BetalingBelopdatadef2307
Private gruppeidField As String
Public Sub New()
MyBase.New
Me.gruppeidField = "4899"
End Sub
'''<remarks/>
<System.Xml.Serialization.XmlElementAttribute("BetalerFodselsnummer-
datadef-2305")> _
Public Property BetalerFodselsnummerdatadef2305() As
BetalerFodselsnummerdatadef2305
Get
Return Me.betalerFodselsnummerdatadef2305Field
End Get
Set
Me.betalerFodselsnummerdatadef2305Field = value
End Set
End Property
I hope somebody can help me with this! Thanks!