I am aware that I can't dynamically refer to a variable (eg. 'var & var.Close()'). Can I somehow have a variable that can point to another variable by name?
My current code is (where func() requires an array):
Dim playerNum As String = “P1”
Select Case playerNum
Case “P1”
Func(P1(x, xx))
Case “P2”
Func(P2(x, xx))
.........
End Select
Can something along these lines be done?
Dim playerNum As varNameRef = P1(,)
Func(playerNum(x, xx))
Really anything to stop so much repetition would be greatly appreciated. Cheers.