Overloaded methods with identical signatures cause compilation errors, even if return types are different. : Overloading Method : Class Interface C# Source Code


Custom Search

C# Source Code » Class Interface » Overloading Method »

 

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;
   }
}



       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Class Interface
» Overloading Method