Example #1
0
        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()));
        }
Example #2
0
 public static void RemoveLast <TKey, TValue>(this Dict <TKey, TValue> rDict)
 {
     rDict.Collection.Remove(rDict.LastKey());
 }