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