-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathKeyValueList.cs
22 lines (21 loc) · 897 Bytes
/
KeyValueList.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace RoliSoft.TVShowTracker
{
using System.Collections.Generic;
/// <summary>
/// Represents a collection of keys and values, but the keys don't have to be unique.
/// </summary>
/// <typeparam name="TKey">The type of the keys in the dictionary.</typeparam>
/// <typeparam name="TValue">The type of the values in the dictionary.</typeparam>
public class KeyValueList<TKey, TValue> : List<KeyValuePair<TKey, TValue>>
{
/// <summary>
/// Adds the specified key and value to the dictionary.
/// </summary>
/// <param name="key">The key of the element to add.</param>
/// <param name="value">The value of the element to add. The value can be <c>null</c> for reference types.</param>
public void Add(TKey key, TValue value)
{
Add(new KeyValuePair<TKey, TValue>(key, value));
}
}
}