VB .NET: I can't remember what this is called!! HELP!

alocurto

Platinum Member
Nov 4, 1999
2,174
0
76
How do I execute a string?

example:

Dim MyCommand As String = "MyArray(2) = 400"
execute(MyCommand)
'Now MyArray(2) holds 400

I can't remember for the life of me what this is called. Can anyone help me out?
 

flamingsouls

Member
Oct 9, 1999
86
0
0
I don't think what you are doing is quite right...but don't quote me. Here is how you would execute an array and assign a value.

Dim myArray(3) as string() 'Declares an array with 4 elements
dim myString as string() = "Hello world" 'Declare a string that says hello world
myArray(2) = myString 'Assigns the third element to myString


Let me know if this works.


Thanks
Josh
 

Apathetic

Platinum Member
Dec 23, 2002
2,587
6
81
Originally posted by: alocurto
How do I execute a string?

example:

Dim MyCommand As String = "MyArray(2) = 400"
execute(MyCommand)
'Now MyArray(2) holds 400

I can't remember for the life of me what this is called. Can anyone help me out?

I don't think VB or VB.NET have an Interperet() function.

Dave
 

alocurto

Platinum Member
Nov 4, 1999
2,174
0
76
Haven't looked at this in a while. FlamingSouls, I know that is incorrect. What I was trying to do is execute that string as a command.