Overloaded methods with identical signatures cause compilation errors, even if return types are different.
public class MethodOverloadError
{
public int Square( int x )
{
return x * x;
}
public double Square( int y )
{
return y * y;
}
}
Related examples in the same category