Exemplo n.º 1
0
        public static void ViDu1()
        {
            int      a = 9, b = 10;
            TinhTong tinhTong = (int x, int y) =>
            {
                return(x + y * 1000);
            };
            TinhTong tinhTong2 = (int x, int y) => x + y * 1000;

            Console.WriteLine(tinhTong2(a, b));
        }
        static void Main(string[] args)
        {
            Console.OutputEncoding = Encoding.GetEncoding("UTF-8");
            //PHát đi sự kiện
            UserInput userInput = new UserInput();

            //Nhận sự kiện
            TinhTong tinhTong = new TinhTong();

            tinhTong.thiHanh(userInput);

            //Thực thi tác động vào sự kiện
            userInput.getInputValue();
        }