fork download
  1. using System;
  2.  
  3. namespace Articulos.Ch03
  4. {
  5. public class MultiplesParametros2Sobrecarga
  6. {
  7. public static void Metodo (int x, double y)
  8. {
  9. Console.WriteLine ("Metodo(int x, double y)");
  10. }
  11.  
  12. public static void Metodo (double x, int y)
  13. {
  14. Console.WriteLine ("Metodo(double x, int y)");
  15. }
  16.  
  17. public static void Main ()
  18. {
  19. Metodo (13, 19);
  20. }
  21. }
  22. }
Compilation error #stdin compilation error #stdout 0.02s 33688KB
stdin
Standard input is empty
compilation info
prog.cs(19,25): error CS0121: The call is ambiguous between the following methods or properties: `Articulos.Ch03.MultiplesParametros2Sobrecarga.Metodo(int, double)' and `Articulos.Ch03.MultiplesParametros2Sobrecarga.Metodo(double, int)'
prog.cs(7,36): (Location of the symbol related to previous error)
prog.cs(12,36): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty