我一直在努力寻找合并或合并两个 dics 的逻辑..
enum type
{
First,
Second,
Third
}
Class sample
{
string name;
int no;
}
public static Dictionary<type,List<sample>> GetDataDir(Dictionary<type,List<sample>> data1,Dictionary<type,List<sample>> data2)
{
Dictionary<type,List<sample>> dataOut = new Dictionary<type,List<sample>>();
// here one of the sample instance (data1) and key name is equal condition ,we have to update the data1 dic with key and update the sample of data2
return dataOut ;
}
请帮我找到出路...