I have this 2D array:
Private _Chars As String(,) = {{"`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "="},
{"¬", "!", """", "£", "$", "%", "^", "&", "*", "(", ")", "_", "+"}}
I want to Pass a Dimension (ie. the First Line) into a Function, or the Second Line into a function to switch between these two lists so that the function only requires a String() parameter not a String(,) parameter so I could loop through both like so:
Sub Example(Row as String())
For Index as Integer = 0 To Row.Count - 1
MessageBox.Show(Row(Index))
Next
End Sub
And this function would loop though 12345 etc and !ӣ$% etc.
If there is way to have the arrays work this was and that works in Silverlight – I would ge very grateful!
You can’t do it (easily). Your best option is to create a jagged array (an array of arrays) like this:
You could then call your function like this: