static void Main(string[] args) { Sumador sumador = new Sumador(); Sumador sumador2 = new Sumador(); Console.WriteLine(sumador.Sumar("culo", "caca")); Console.WriteLine(sumador.Sumar(4, 4)); Console.WriteLine(sumador2.Sumar("pito", "pis")); Console.WriteLine(sumador2.Sumar(8, 8)); Console.WriteLine((int)sumador); Console.WriteLine((int)sumador2); Console.WriteLine(sumador + sumador2); Console.WriteLine(sumador | sumador2); Console.ReadKey(); }
static void Main(string[] args) { Sumador s = new Sumador(); Console.WriteLine(s.Sumar(10, 20)); Console.WriteLine(s.Sumar("Hola", "Chau")); Console.WriteLine((int)s); Sumador s2 = new Sumador(); Console.WriteLine(s2.Sumar(10, 20)); Console.WriteLine(s2.Sumar("Hola", "Chau")); Console.WriteLine((int)s2); Console.WriteLine(s + s2); Console.WriteLine(s | s2); Console.ReadKey(); }