static void Main(string[] args)
        {
            Sumador sumador1 = new Sumador(10);
            Sumador sumador2 = new Sumador(10);

            Console.WriteLine(Convert.ToString((int)sumador1));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Sumador calculo  = new Sumador();
            Sumador calculo2 = new Sumador();

            Console.WriteLine(calculo.Sumar(5, 5));
            Console.WriteLine(calculo.Sumar("hola ", "mundo"));
            Console.WriteLine((int)(calculo));
            Console.ReadKey();
            Console.WriteLine(calculo2.Sumar(10, 4));
            Console.WriteLine(calculo2.Sumar("Soy ", "sumador 2"));
            Console.WriteLine((int)(calculo2));
            Console.ReadKey();
            Console.WriteLine(calculo + calculo2);
            Console.WriteLine(calculo | calculo2);
            Console.ReadKey();
        }