Overloaded methods with identical signatures cause compilation errors, even if return types are different.

image_pdfimage_print
   




public class MethodOverloadError
{
   public int Square( int x )
   {
      return x * x;
   }
   public double Square( int y )
   {
      return y * y;
   }
}