Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have situation

abstract class a
       {
           public virtual string add()
           {
               return ("Minus"+(10 - 2));
           }
       }
       class b : a
       {
           public override string add()
           {
               return ("Plus" + (10 + 2));
           }
       }

i want to call base class Add function how can i do it?
Posted
Updated 20-May-11 2:50am
v2
Comments
[no name] 20-May-11 8:50am    
Use code block to format code snippets
Sergey Alexandrovich Kryukov 20-May-11 22:28pm    
The question make little sense without the language. This question is not so fundamental; and the answer is language-specific. Tag the language!
--SA

1 solution

C#
class b : a
{
   public override string add()
   {
      return base.add();
   }
}
 
Share this answer
 
Comments
#realJSOP 20-May-11 9:47am    
5 - proposed as answer
Manfred Rudolf Bihy 20-May-11 10:28am    
Same here! 5+
This is the solution!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900