I have two dictionaries, namely
Dictionary DictA=new Dictionary(); Dictionary DictB=new Dictiona
DictA.Join(DictB, a => a.Key, b => b.Key, (a,b) => new KeyValuePair<int,string>(b.Value,a.Key)) .ToDictionary(x => x.Key, x => x.Value);
Very simple:
var query = DictA .Where(a => DictB.ContainsKey(a.Key)) .ToDictionary(a => DictB[a.Key], a => a.Value);
I get this result: