






































1
GroupDictionary:
2
internal class GroupDictionary<T> : Dictionary<String, List<T>>
3
{
4
public void Add(String key, T value)
5
{
6
List<T> list = null;
7
if (!this.ContainsKey(key) || !(this.TryGetValue(key, out list)))
8
{
9
list = new List<T>();
10
this.Add(key, list);
11
}
12
list.Add(value);
13
}
14
}

2

3

4

5

6

7

8

9

10

11

12

13

14
