I have two classe
Class One{
int id;
string name;
int total;
int val2;
int level;
}
Class Two{
int id;
string name;
string parentName;
int parentId;
int level;
}
class One contains information about id, name & some numeric fields. Class Two on the other hand contains id, names (which contains same data as in class One) but it also contains hierarchical information. Like who is the parent of current node & the level info (which is available in class One)
I need to merge the two classes based on Id field & produce result like this:
class Three{
int id;
string name;
string parentName;
int parentId;
int level;
int total;
int val2;
}
What is the most efficient way to get the desired result in C#. If the list were same, we could have used the Concat method.