Srinivasan Baskaran
asked on
Generic solution to add new property to existing class
Hi
I have a C # class which is a third party reference in my console app.
Am looking for some generic solution to add a new property to the existing C# class.
Eg: I have a customer class with Name, Age, and Title. This class I got from the third party and now I need to add new property say the address. So similarly I should be able to add any new property.
Let me know any pointers on this.
I have a C # class which is a third party reference in my console app.
Am looking for some generic solution to add a new property to the existing C# class.
Eg: I have a customer class with Name, Age, and Title. This class I got from the third party and now I need to add new property say the address. So similarly I should be able to add any new property.
Let me know any pointers on this.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And BTW, don't expect the base class to do all the selects/inserts/updates/de letes for you because the base class knows nothing about your new properties.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got my idea validated plus multiple other options which i was not aware of it. Thanks to all who have contributed to my query.