Reputation: 3311
In VBA I can set the values of a multidimensional array this way:
mArr = [{"1", "Hello"; "World", "I"; "am", "Sam"}]
How can I do this in vb.net?
I mean something like (not working):
Dim mArr() As String From [{"1", "Hello"; "World", "I"; "am", "Sam"}]
Upvotes: 1
Views: 272
Reputation: 4037
You can have it as:
Dim values(,) As String =
New String(,) {{"1", "Hello"},
{"World", "I"},
{"am", "Sam"}}
Upvotes: 1
Reputation: 9041
A little research would go along way... https://msdn.microsoft.com/en-us/library/0sxy840k(v=vs.90).aspx
Dim startingScores(,) As Short = New Short(1, 1) {{10, 10}, {10, 10}}
Upvotes: 2