Updated Utilities

This commit is contained in:
Tal Aloni 2018-10-31 22:51:41 +02:00
parent 4e850aa38a
commit ff368056c5
6 changed files with 85 additions and 6 deletions

View file

@ -6,6 +6,14 @@ namespace Utilities
{
public partial class KeyValuePairList<TKey, TValue> : List<KeyValuePair<TKey, TValue>>
{
public KeyValuePairList()
{
}
public KeyValuePairList(List<KeyValuePair<TKey, TValue>> collection) : base(collection)
{
}
public bool ContainsKey(TKey key)
{
return (this.IndexOfKey(key) != -1);
@ -97,5 +105,10 @@ namespace Utilities
return comparer.Compare(a.Key, b.Key);
});
}
public new KeyValuePairList<TKey, TValue> GetRange(int index, int count)
{
return new KeyValuePairList<TKey, TValue>(base.GetRange(index, count));
}
}
}