fork download
  1. using System;
  2.  
  3. namespace Articulos.Cap03
  4. {
  5. internal class DelegadosFirmaMetodos
  6. {
  7. public delegate double Operacion(double a, double b);
  8.  
  9. public static void Main()
  10. {
  11. Operacion suma = new Operacion(Sumar);
  12. }
  13.  
  14. public int Sumar(int a, int b)
  15. {
  16. return a + b;
  17. }
  18. }
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(11,42): error CS0123: A method or delegate `Articulos.Cap03.DelegadosFirmaMetodos.Sumar(int, int)' parameters do not match delegate `Articulos.Cap03.DelegadosFirmaMetodos.Operacion(double, double)' parameters
prog.cs(7,40): (Location of the symbol related to previous error)
prog.cs(14,28): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty