Reputation: 2600
I have two standard layers i.e. Business and domain layers which contain similar objects and now i want to provide some standard way of converting objects back and fro from both sides. I found three options.
So what other methods are available in .NET ?
Upvotes: 1
Views: 157
Reputation: 52518
You could use reflection to copy properties with the same name (and datatype) from one class to the other.
If you want to go one step further, you can use reflection to generate classes that copy one class to the other.
Upvotes: 0