Chris (mc_funkymcmeep) wrote in sw_engineers,
Chris
mc_funkymcmeep
sw_engineers

VB.Net variable combining

I'm trying to combine the name of a variable, with a number contained in another variable. The thing I'm trying to do with it isn't supported by arrays, otherwise I'd use them.

say I have variable1 and variable2
instead of doing something like:
console.writeline(variable1)
console.writeline(variable2)

I would like to do something like:
for x = 1 to 2
console.writeline(variable & x)
next

so that it will print the variable ending with the number in x.

I know you can do this in Java and PHP, so I was hoping I could do it in VB.Net.

Thanks
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

  • 3 comments