I have defined a class1 which is inherited from base 1. I have also defined another class2 which contains simila members as in class1 but this class inherited from base2.
How can I convert class1 to Class2?
One options is I have to assign one property at a time like
Class2.a = Class1.a;
Class2.b = Class1.b;
Class2.c = Class1.c;
Is there any better alternative in .NET?
if you have to do it between a lot of different types you could consider using AutoMapper