Beispiel #1
0
 public string FindValue(string keyToSearch)
 {
     if (NonHashedKeys.Contains(keyToSearch))
     {
         int valueIndex = NonHashedKeys.IndexOf(keyToSearch);
         return(Value[valueIndex]);
     }
     else
     {
         throw new ArgumentException("The given key doesn't exist.");
     }
 }
Beispiel #2
0
 public void Remove(string k)
 {
     if (!NonHashedKeys.Contains(k))
     {
         throw new ArgumentException("Key doesn't exist.");
     }
     else
     {
         int keyIndex = NonHashedKeys.IndexOf(k);
         NonHashedKeys.RemoveAt(keyIndex);
         Key.RemoveAt(keyIndex);
         Value.RemoveAt(keyIndex);
     }
 }