I am confusing about "new" keyword,tell me about new
which class(means base class or derived class) method can hide new keyword.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Danatas GerviPosted Sep 17, 2009, 4:09 AM
The new key word also allows hiding the method of base class in derived class.
You can do it any how (even without new) by giving the same name of method in derived class, but the compiler will warn you "method …. Hides …. Etc "
So, "new" – is the way to say to compiler, that you really want it, this is not bug.