Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Future as a FoxPro Developer
Message
From
09/07/2004 15:02:26
 
 
To
09/07/2004 14:29:23
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00918302
Message ID:
00922650
Views:
28
>>
>>At runtime, a VFP program can create its own code, on the fly, and run it. That's cool.
>
>That's more than just cool - I've had a case where it saved me about 40000 IF statements.

Sorry, Dragan, I should have said "Way Cool!"

>
>BTW, how does one create an object factory in dot net? In VFP, I know the easiest way is to just have a table with user-friendly class names, and actual class names and classlib names. Then it's a piece of cake to
>
>newobject(alltrim(factory.classname)), alltrim(factory.classlib))
>
>I'm mentioning this because the ADO paradigm has already brought some of the name expression mechanism into any language that uses it - the field names need not be hardcoded; I'm wondering whether there's a similar name expression mechanism for class names. Yes, I have Kevin's book, but I'd rather hear a live comment.
>

I don't have Kevin's book, and I'm only a week into C# :)

Using the method in the following website, in addition to defining the new class, you'd have to modify the factory class to make it aware of the new class definition.

http://www.c-sharpcorner.com/Language/FactoryPatternsinCSRVS.asp
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform