+ 1
I don't get the Method Overloading Tutorial C#
I try to use this just like in the lesson: static void Print33(int a) { Console.WriteLine("Value: " + a); } static void Print33(double a) //does this still work? IDE gives error 'cuz name still exists. { Console.WriteLine("Value: " + a); } VisualStudio throws an error because the name exists, but the args are obviously different. What gives?
4 Respostas
+ 2
Yeah i figured it out. Had to place these Print33 out of Main.. First time here sorry, thank you for the quick reply
+ 3
Can you share your complete code? I tried it just now, and there's no problem.
Save the code and share its link instead, more convenient for analysis. Follow the below guide to sharing links 👍
https://www.sololearn.com/post/75089/?ref=app
+ 1
Ah ok, not a problem 👌
0