Found it!!!! I've just found the PropertyBuilder Class in Reflection.Emit which seems to do the job and you can also code/compile Methods on the Fly as well. Now to wade myself through the documentation and understand how it works!
Dave Crozier The secret to staying young is to live honestly, eat slowly, and to lie about your age -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ed Leafe Sent: 05 September 2006 16:13 To: ProFox Email List Subject: Re: [NF] .NET AddProperty() Equivalent On Sep 5, 2006, at 11:08 AM, Dave Crozier wrote: > Anyone out there know af the .NET Equivalent of VFP's AddProperty ()? > I am just into developing a C# App which needt to create dynamic > properties. I initially used an 2D array holding the property name and > value but I'd really like to be able to create named properties on the > fly as per VFP and can't seem to find any reference to this within the > C# language. That's one of the cool things about Python: you can add attributes of an object on the fly, including methods! Makes factory operations much simpler: you can have a single class, and attach the behaviors you want in the factory. -- Ed Leafe -- http://leafe.com -- http://dabodev.com [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.