Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macrosubstitution in VB.NET
Message
From
04/05/2005 16:42:45
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01010831
Message ID:
01011053
Views:
16
Hi, David.

>In VFP the function Evaluate or macrosubstitution is used to execute a string...
>
>as that in VB.NET can be done??
>
>For example:
>
>Dim oObj as String
>oObj = "Form1.Text4.Text"
>&oObj = "Test"

As others pointed, you can use Reflection to do it, and Rick explains this perfectly in his papers. However, have in mind that in many cases you have other means to solve this. VFP developers are very accustomed to use this as it is easy and performs well enough in most cases, but non-VFP developers never had such a feature so readily available and didn't need it.

My recommendation would be to think about other approaches, and use dynamic code as a last resort. It is not only a performance issue. In many situations the performance impact is negliglible, but the problem is that you relax many many analysis features, as the ability to parse and refactor that code, leverage compiler checking, etc.

Saludos,
Previous
Reply
Map
View

Click here to load this message in the networking platform