I have two List
objects:
For example:
List 1:
ID, Value where Id is populated and value is blank and it contains s
Dictionary List1 = new Dictionary();
List1.Add(1,"");
List1.Add(2,"");
List1.Add(3,"");
List1.Add(4,"");
List1.Add(5,"");
List1.Add(6,"");
Dictionary List2 = new Dictionary();
List2.Add(2, "two");
List2.Add(4, "four");
List2.Add(6, "six");
var Result = List1.Select(x => new KeyValuePair(x.Key, List2.ContainsKey(x.Key) ? List2[x.Key] : x.Value)).ToList();