This project has moved and is read-only. For the latest updates, please go here.

System.Collections.Generic.Dictionary extension methods

Sort()

Summary: Returns a new instance of System.Collections.Generic.SortedDictionary<TKey,TValue> that is based on the specified Dictionary<TKey,TValue> and uses the default System.Collections.Generic.IComparer<T> implementation for the key type
C# Example:
var dict = new Dictionary<string, object>();

var sortedDict = dict.Sort();

Sort(IComparer<TKey> comparer)

Summary: Returns a new instance of System.Collections.Generic.SortedDictionary<TKey,TValue> that is based on the specified Dictionary<TKey,TValue> and uses the specified System.Collections.Generic.IComparer<T> to compare keys
C# Example:
var dict = new Dictionary<string, object>();

var sortedDict = dict.Sort(new MyCustomIComparer());

Last edited May 4, 2012 at 3:11 PM by crpietschmann, version 2

Comments

No comments yet.