开发者

Is there a grid for storing data?

开发者 https://www.devze.com 2023-03-09 20:16 出处:网络
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 t

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)}
0

精彩评论

暂无评论...
验证码 换一张
取 消