c# iorderedenumerable to dictionary

C#
sortedDict.ToDictionary(pair => pair.Key, pair => pair.Value);
Source

Also in C#: