Click here to Skip to main content
15,885,928 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can i override non-abstract method in c#?
Posted

Yes, but you would have to mark it with the virtual[^] keyword.

You can also hide a method/member that is inherited from a base class by using the new[^] modifier. The only reason why you would want to do that though, is when you're inheriting from a class that is part of a third party library and the method is not marked as virtual.
 
Share this answer
 
v2
Comments
Faisalabadians 28-Feb-14 2:51am    
+5
abid zahid 28-Feb-14 9:10am    
Thank you sir!
Maarten Kools 28-Feb-14 9:11am    
You're welcome
Yes, or you can hide it using new
http://msdn.microsoft.com/en-us/library/ebca9ah3.aspx[^]
 
Share this answer
 

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