public void Add(KeyValuePaar <TKey, TValue> paar) { KeyValuePaar <TKey, TValue>[] temp = new KeyValuePaar <TKey, TValue> [Boek.Length + 1]; for (int i = 0; i < temp.Length - 1; i++) { temp[i] = Boek[i]; } temp[temp.Length - 1] = paar; Boek = temp; }
public void Remove(TKey key) { KeyValuePaar <TKey, TValue>[] temp = new KeyValuePaar <TKey, TValue> [Boek.Length - 1]; int a = 0; for (int i = 0; i < temp.Length + 1; i++) { if (!Boek[i].Key.Equals(key)) { temp[a] = Boek[i]; a++; } } Boek = temp; }
public void Add(KeyValuePaar <TKey, TValue> paar) { Boek.Add(paar); }