好像是什么存储多维数据vb.net存储多维数据
当我从数据库中检索记录的最简单的方法我想知道最简单的方法,我用一个数组来存储,我会用一些信息后来这样的
rowCtr = 0
For Each dr As DataRow In dt.Rows
md(rowCtr, 0) = dr("member_id").ToString
md(rowCtr, 1) = dr("full_name").ToString
md(rowCtr, 2) = dr("status").ToString
md(rowCtr, 3) = dr("archived").ToString
...
rowCtr = rowCtr + 1
Next
访问特定成员的数据,我用这个
'first i loop through the md array to get the array index (ind) of a member
'then, i can get the data of a member by using this
md(ind, 0) 'To get the id
md(ind, 1) 'To get the full name
它有点困难,因为我总是需要知道并指定索引
我希望它是这样
md("443", "full_name") 'to get the full name
md("443", "status") 'to get the status
,其中443是其成员的ID,我用它作为第一个维度
我看了一下哈希表,字典,列表的关键 - 但我似乎无法找到在多维度的风格
如果可能的话使用它们一个很好的例子,我也想长度是动态的,而当我删除索引,其余的将填补它的现货 -
我还需要它有一个搜索方法,以查找member_id是否已经在列表中
最简单的方法是什么?请回复..谢谢
谢谢,伙计我会尝试 – jks