General information
Title:
Using the value contained in a string as a variable name
Hi all,
In VFP you can use the contents of a string as a variable:
nVar1 = 10
strVar = "var1"
nSum = &strVar + 1
* Result nSum = 11
Or as the name of a control:
strControlName = "myControl"
thisform.&strControlName..Caption = "Hello"
Or like this:
strCmd = "messagebox("Hello")"
&strCmd
Now for my question:
How can I reference the contents of a string in VS.NET (VB or C#) as shown above?
Best,
Vera
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only