Class SunamoDictionarySort<T, U>
- Namespace
- SunamoCollectionsGeneric.Collections
- Assembly
- SunamoCollectionsGeneric.dll
Dictionary with sorting capabilities for keys and values
public class SunamoDictionarySort<T, U> : Dictionary<T, U>, IDictionary<T, U>, ICollection<KeyValuePair<T, U>>, IReadOnlyDictionary<T, U>, IReadOnlyCollection<KeyValuePair<T, U>>, IEnumerable<KeyValuePair<T, U>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable where T : notnull
Type Parameters
TThe type of keys
UThe type of values
- Inheritance
-
Dictionary<T, U>SunamoDictionarySort<T, U>
- Implements
-
IDictionary<T, U>ICollection<KeyValuePair<T, U>>IReadOnlyDictionary<T, U>IReadOnlyCollection<KeyValuePair<T, U>>IEnumerable<KeyValuePair<T, U>>
- Inherited Members
- Extension Methods
Methods
RemoveWhereInValuesIsOnlyOneObject<TValue>(Dictionary<T, List<TValue>>)
Removes entries from the dictionary where the value list contains only one object
public Dictionary<T, List<TValue>> RemoveWhereInValuesIsOnlyOneObject<TValue>(Dictionary<T, List<TValue>> dictionary)
Parameters
dictionaryDictionary<T, List<TValue>>The dictionary to filter
Returns
- Dictionary<T, List<TValue>>
A new dictionary containing only entries with more than one value
Type Parameters
TValueThe type of values in the list
SortByKeyAsc()
z-a, then numbers 9-0, then slash. Call Reverse()
public void SortByKeyAsc()
SortByKeysDesc()
Sorting a-z. Slash as first, then numbers, then letters - all in standard. No Reserve() calling
public void SortByKeysDesc()
SortByValuesAsc()
z-a, then numbers 9-0, then slash. Call Reverse().
public void SortByValuesAsc()
SortByValuesDesc()
Sorted a->z, slash first, then numbers, then letters - all standard. Compared without calling Reverse.
public void SortByValuesDesc()