Stijn

Stijn

  • NA
  • 1
  • 0

Putting content of a found variable into another one

Jun 15 2010 1:48 PM

Hi,
In vb.net 2010 I'm trying to find a variable by it's name and put it's content into another variable of the same name. The code below would work for the .content of a label to copy it into another string but for a variable into another variable I might miss someting?
 

 

Dim BoxName As String = "ContentBox" & i + 1 ==> creating my searchstring here
Dim contentArray(,) As Integer = DirectCast(Me.FindName(BoxName), Integer(,)) ==> looking for the variable and putting it's value in a new variable to use it afterwards
What's the easiest way to achieve this? I'm assuming that Me.FindName() is not the right way to look for a method?
 
Thanks!
Stijn