开发者

Multidimensional Associative Arrays in VB.NET?

开发者 https://www.devze.com 2022-12-14 15:19 出处:网络
is there in VB.NET something like this in ph开发者_C百科p?: $var[\"a1\"][\'name\']=\"Mike\"; $var[\"a1\"][\'nick\']=\"MMM\";

is there in VB.NET something like this in ph开发者_C百科p?:

$var["a1"]['name']="Mike";
$var["a1"]['nick']="MMM";

I tried hashtables, dictionary, lists and arrays in .net, all I could get is a simple key=>value array Is there a simple solution if not, is there a class or something for this?

Thanks.


You could always create a structure and place that into a dictionary.

Something like this:

Private Structure Person
  Public Name as String
  Public Nick as String
End Structure

Then your dictionary like this:

  Dim myDictionary as Collections.Generic.Dictionary(Of String, Person)
0

精彩评论

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