public static KeyValuePair <TKey, TValue> Last <TKey, TValue>(this Dict <TKey, TValue> rDict) { if (rDict.Count == 0) { return(default(KeyValuePair <TKey, TValue>)); } return(new KeyValuePair <TKey, TValue>(rDict.LastKey(), rDict.LastValue())); }
public static void RemoveLast <TKey, TValue>(this Dict <TKey, TValue> rDict) { rDict.Collection.Remove(rDict.LastKey()); }