Advertisement
Geralt1001

Untitled

Nov 22nd, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.11 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication3
  8. {
  9.     class Program
  10.     {
  11.         public int ex()
  12.         {
  13.             return 2;
  14.         }
  15.  
  16.         public int ex1()
  17.         {
  18.             return 22;
  19.         }
  20.  
  21.         public int ex2()
  22.         {
  23.             return 3;
  24.         }
  25.  
  26.         public int ex3()
  27.         {
  28.             return 1;
  29.         }
  30.  
  31.  
  32.         static void Main(string[] args)
  33.         {
  34.             Program pr = new Program();
  35.             int function = pr.ex();
  36.             int function1 = pr.ex1();
  37.             int function2 = pr.ex2();
  38.             int function3 = pr.ex3();
  39.  
  40.  
  41.             Dictionary<string, int> map = new Dictionary<string, int>();
  42.  
  43.             map.Add("ex", function);
  44.             map.Add("ex1", function1);
  45.             map.Add("ex2", function2);
  46.             map.Add("ex3", function3);
  47.  
  48.  
  49.             foreach (var maps in map)
  50.             {
  51.                 Console.WriteLine(maps.Value);
  52.             }
  53.  
  54.             Console.ReadLine();
  55.         }
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement