Knowing this question's answer, what is the way to join 2 (only) dictionaries (.Net 4.5)?
Duplicates not admitted, the first one wins (see example bellow).
using System;
using System.Linq;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
var d1 = new Dictionary<int, string>();
var d2 = new Dictionary<int, string>();
// combine both, keep first duplicate only
var result = d1.XXX?(d2);
}
}
say
[<1,'a'>, <2, 'b'>]
+ [<3,'c'>, <1, 'x'>]
= > [<1,'a'>, <2, 'b'>, <3,'c'>]