Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.NET Macro command
Message
From
07/06/2008 12:05:15
 
 
To
07/06/2008 03:30:27
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01322255
Message ID:
01322303
Views:
14
This message has been marked as the solution to the initial question of the thread.
Hi Bernard,

You need to use Reflection. Here is a good article by Rick that I usually point out to people asking about a way to do a VFP EVALUATE:

http://west-wind.com/weblog/posts/256.aspx

This is an old blog, but it still applies. It's C# though, so hopefully you can make the translation to VB work for you (you can use one of the online translation tools for help with this. I like this one: http://www.carlosag.net/Tools/CodeTranslator/)

~~Bonnie


>Hi
>
>Is there a way to accomplish the same thing, possible in VFP?
>
>I am looking to create a factory object in VB.Net. I want to have a function like this:
>
>Function SetProperty(ByVal MyObject as string, ByVal MyProp as string, ByVal Propvalue as string, ByVal PropType as string) as boolean
>
>I then pass in the properties and based on the PropType do a conversion to Propvalue and for the object MyObject.MyProp I set its value to the converted Propvalue.
>
>
>
>I know this is possible using EVALUATE or Macro(&) in VFP.
>
>Is there some way this can be done in VB.Net? The idea is to set properties of the object externally. It is not essential that the parameters be passed as strings, only that I can then set them in VB thru the function but externally.
>
>Thanks
>
>Bernard
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform