M
mosscliffe
Newbie struggling with VB.NET
I wish to create an arraylist of structures. I am very new to this
coding syntax, so bear with my poor syntax - please
struct mystruct
Fld1 as short
Fld2 as integer
Fld3 as string
Fld4 as short
etc
end Struct
dim myarraylist as arraylist of mystruct
How do assign values to the elements of the structures
dim next as short = 0
for example myarraylist(next).Fld1 = 45
myarraylist(next).Fld3 = "Bill"
etc
And then how would I access these values
example Dim mystring as string = myarraylist(current).Fld3
I hope you can understand what I am trying to do.
Having cracked the above - how can I populate a listbox with two of the
fields as a listitem pair.
Any sample code or pointers would be appreciated. I have looked for
answers and I have two books, but somehow this example has evaded me.
Richard
I wish to create an arraylist of structures. I am very new to this
coding syntax, so bear with my poor syntax - please
struct mystruct
Fld1 as short
Fld2 as integer
Fld3 as string
Fld4 as short
etc
end Struct
dim myarraylist as arraylist of mystruct
How do assign values to the elements of the structures
dim next as short = 0
for example myarraylist(next).Fld1 = 45
myarraylist(next).Fld3 = "Bill"
etc
And then how would I access these values
example Dim mystring as string = myarraylist(current).Fld3
I hope you can understand what I am trying to do.
Having cracked the above - how can I populate a listbox with two of the
fields as a listitem pair.
Any sample code or pointers would be appreciated. I have looked for
answers and I have two books, but somehow this example has evaded me.
Richard