TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Suresh Ravi
NA
114
42.7k
Is there any difference b/w baseclass method hiding (using new) and overriding virtual methods??
Aug 31 2009 5:40 AM
Using the new keyword we are hiding the base methods implementation. using override we are overriding the base class method with a new implementation in derived class. For me both looks like the same. i dont feel any difference. Class Baseclass { public void mymethod() { my implementation } } Class Derived : BaseClass { new public void mymethod() { my new implemetation } } if i want to access base calss method, i can use BaseClass.mymethod() . if i want to access the new implementation i can use Derived.mymethod(). using the new, i am giving the new implementation to the same method instead of overriding. here what is the difference b/w new and override??
Reply
Answers (
1
)
How can i display data from a microcontroller to PC using Serialport
Dotfuscator Renaming Problem