P
paulo2012
I have the following in VB6:-
Private Type Struct1
Fb As Integer
Dt(1 To 2000) As Byte
End Type
Private Type Struct2
pr(1 To 20) As Integer
End Type
Private Type IN
IsmprA(1 To 40) As Integer
IsmprB(1 To 2) As Struct2
Fr(1 To 2) As Struct1
Fz(1 To 2) As Struct1
End Type
Private Type OUT
OsmprA(1 To 10) As Integer
OsmprB(1 To 2) As Struct2
fRO(1 To 2) As Struct1
End Type
I need to create an equivalent in C#. I have attempted this but get error:-
Cannot have instance field initializers in structs. Help appreciated
Private Type Struct1
Fb As Integer
Dt(1 To 2000) As Byte
End Type
Private Type Struct2
pr(1 To 20) As Integer
End Type
Private Type IN
IsmprA(1 To 40) As Integer
IsmprB(1 To 2) As Struct2
Fr(1 To 2) As Struct1
Fz(1 To 2) As Struct1
End Type
Private Type OUT
OsmprA(1 To 10) As Integer
OsmprB(1 To 2) As Struct2
fRO(1 To 2) As Struct1
End Type
I need to create an equivalent in C#. I have attempted this but get error:-
Cannot have instance field initializers in structs. Help appreciated