private void addNewValueToNewKey(Person key, Mark mark) { List<Mark> value = new List<Mark>(); value.Add(mark); this.marks.Add(key, value); }
protected void addNewMark(Person key, Mark mark) { if (this.marks.ContainsKey(key)) { this.addNewValueToExistsKey(key, mark); } else { this.addNewValueToNewKey(key,mark); } }
private void addNewValueToExistsKey(Person key, Mark mark) { this.marks[key].Add(mark); /* List<Mark> origValue = this.marks[key]; origValue.Add(mark); */ }