-
Collections?!
Is there a collection object to store 4 values, for exam the hashtable only stores 2, i want something that looks like this
KEY_VALUE_VALUE_VALUE
of corse we can use databases, what i want is something like the hashtable, is there any object? or can we expand other options to get something like this?!
-
You could have an array with 4 dimensions. Or you could just define your own class that would have 4 properties, then have an array or arraylist of these. You could also extend and create your own collection that would have Key / Value / Value / Value.
-
going more indepth
create a class
Code:
Class blah
Public Name As String
Public SomeData As Integer
End Class
then create an instance and populate the data
Code:
Dim b as New blah()
b.Name = "Cander"
b.SomeData = 23
then add it to the hashtable
Code:
myhash.Add(b,"some uniqure key")