A zombie for your brain.
Reverse a dictionary
Have you ever wished your dictionary of <K,V> was in fact of <V,K>? I might be the last person to figure this out, but with LINQ (and a couple lambdas) you can do this with one magical line of code:
var newDict = oldDict.ToDictionary(l => l.Value, l => l.Key);
Neat, eh?
You’re not the last to figure it out.