Example #1
0
 public void Removes(MEDICAMENT medicament)
 {
     if (Lekarstvoes.TryGetValue(medicament, out int count))
     {
         Lekarstvoes[medicament] = --count;
     }
     else
     {
         Lekarstvoes.Remove(medicament);
     }
 }
Example #2
0
 public void Add(MEDICAMENT medicament)
 {
     if (Lekarstvoes.TryGetValue(medicament, out int count))
     {
         Lekarstvoes[medicament] = ++count;
     }
     else
     {
         Lekarstvoes.Add(medicament, 1);
     }
 }