Is abstact class accept overloading method? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is abstact class accept overloading method?

Is abstact class accept overloading method? If yes how to do that? I can do that by base class with virtual. However, i tried to do that by abstact and i fail

31st Dec 2017, 8:17 PM
Ibrahim Mohammed A Abdullah
Ibrahim Mohammed A Abdullah - avatar
3 Answers
+ 1
I don’t see why not. Just do it however you do it with regular classes: abstract class A { abstract doSomething(); abstract doSomething(int x); abstract doSomething(int x, int y); }
1st Jan 2018, 1:28 AM
Alexander
Alexander - avatar
0
thank you for your answer yes, you are right. we can do that. we must rewrite evary abstract method in all devided class
9th Jan 2018, 4:37 PM
Ibrahim Mohammed A Abdullah
Ibrahim Mohammed A Abdullah - avatar
0
For some reason I thought you are asking about Java. I’m not familiar with C#, but glad I helped!
10th Jan 2018, 7:19 AM
Alexander
Alexander - avatar