Click here to Skip to main content
15,878,748 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I want to create properties for a class at run time.
For eg: I have a 'Customer' class .At run time I would like to add properties 'Name' and 'Age' to the Customer class.
How can I do this? pls help
Posted
Updated 3-Apr-12 2:34am
v2
Comments
Prasad_Kulkarni 3-Apr-12 7:48am    
What dynamic properties?
Not clear.
Make question clear yourself, and understandable to cpians. This is not done.

Hello

I think it's not possible to create a real property dynamically but it doesn't mean that you can't doing anything!
Please look at this: How do I create dynamic properties in C#?

And maybe this article helps.
 
Share this answer
 
Have you had a look at CodeDOM[^]?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900