Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using the value contained in a string as a variable name
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Using the value contained in a string as a variable name
Miscellaneous
Thread ID:
00853175
Message ID:
00853175
Views:
56
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
Map
View

Click here to load this message in the networking platform