fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace FirstPlugin3
  5. {
  6. class MainClass
  7. {
  8. private static Dictionary<string, int> dict;
  9.  
  10. private static void Dobavlenie(string name, int kolichestvo)
  11. {
  12. dict[name] = kolichestvo;
  13. }
  14.  
  15. private static int Poluchenie(string name)
  16. {
  17. int kol;
  18. dict.TryGetValue(name, out kol);
  19. return kol;
  20. }
  21.  
  22. static void Main(string[] args)
  23. {
  24. dict = new Dictionary<string, int>();
  25. Dobavlenie("Vasek", 12);
  26. Console.WriteLine(Poluchenie("Vasek"));
  27. Console.ReadKey();
  28. }
  29. }
  30. }
Success #stdin #stdout 0.01s 131776KB
stdin
Standard input is empty
stdout
12