Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent to eval()
Message
From
28/03/2010 23:10:05
 
 
To
28/03/2010 22:26:33
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01457734
Message ID:
01457769
Views:
55
>>And thanks again. I tested it in my app and it does *exactly* what I want. This is a very very useful function and is going into my permanent util library.
>>
>>Foxpro folks moving to .NET should pay attention to this one as it is one of the trickiest things I've found in terms of something that works so easily in Fox and just appears mystical in .NET.
>
>One thing to remember however. This approach of evaluating things is to be avoided as much as possible. This is something I learned when moving into this new environment. We got used to that in VFP but, since the first day, I believe it is something that shouldn't have been part of the product. After a few years, I now understand the reasons for it. But, in order to migrate code as is, in the fastest way as possible, I also had to use it on occasional basis. It does the work.

Yes, I do understand the performance hit involved in doing this kind of stuff. In this case - a form finding a property that would not otherwise be available through strong typing etc - it is exactly the trick, but the Microfour guys made it really clear to use that reflection was a last resort to be used in special cases and is not a good strategy for general data handling.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Reply
Map
View

Click here to load this message in the networking platform