>>
>>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