Link to home
Start Free TrialLog in
Avatar of Srinivasan Baskaran
Srinivasan BaskaranFlag for India

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.
SOLUTION
Avatar of Misha
Misha
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And BTW, don't expect the base class to do all the selects/inserts/updates/deletes for you because the base class knows nothing about your new properties.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Srinivasan Baskaran

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.