Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent to eval()
Message
 
 
To
28/03/2010 20:02:25
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01457734
Message ID:
01457735
Views:
53
>I have a number of properties which are objects ( business objects )
>
>If I have string which is the same as the name of one of those properties I would like to find the value of a property of the corresponding object.
>
>in VFP
>
>*property is called _Propmaster
>
>varstr = "Propmaster"
>prop = "_"+varstr+".count"
>
>mycount = eval(prop)
>
>
>Looking for a technique that will accomplish the same thing in .NET
>
>vb or C#
>
>TIA

Have you looked into reflection?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform