Is there a grid for storing data?
I need to store data in a grid like this:
{0,1,2,3}
{4,5,6,7}
{8,9,10,11}
{12,13,14,15}
I know I can use multi dimensio开发者_JAVA百科nal arrays, but Is there any easier way to do it? Also I need to get values from it like myData.Item(0,1) would return 1.
You can have a list of tuples if you are using .NET 4.0.
In this case, Tuple(Of T1, T2, T3, T4):
Dim matrix() =
{ Tuple.Create(0,1,2,3),
Tuple.Create(4,5,6,7),
Tuple.Create(8,9,10,11),
Tuple.Create(12,13,14,15)}
精彩评论