471,337 Members | 902 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

using 'new'. Do I have this right?

Putting Polymorphism aside. In a situation where a non-virtual method
in a base class is hiden in a derived class by declaring a method with
the same signature as in the base, you only have the option of using
the 'new' keyword but not the override keyword. Correct? That said,
explicitly marking the method with 'new' or not will result in the same
thing. Correct? But by explicitly marking it with 'new' your code
becomes self-documented to other programmers of your intention to
provide a different interpretation and implementation of the method. So
in this situation (where no polymorphism is involved); that's the
*only* use of the 'new' keyword. Correct?

Jan 31 '06 #1
1 938

Yes you got it.

Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Feb 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Daniel | last post: by
10 posts views Thread by Gregory A Greenman | last post: by
4 posts views Thread by chandra.somesh | last post: by
1 post views Thread by Jason Hickey | last post: by
1 post views Thread by kingster | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.