c# - Overloading return types -


this question has answer here:

is following method overloaded?

class {   public void display(int a, int b)   {      console.write(a+b);    }    public int display(int a, int b)   {     return a+b; //return a+b value   }   } 

the return type doesn't affect method's signature. code not compile, either type or number of parameters should different in order make compile.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -