Tips and Tricks in a world of Mix

New Vs Override

http://msdn2.microsoft.com/en-us/library/435f1dw2.aspx

The new modifier instructs the compiler to use your implementation instead of the base class implementation. Any code that is not referencing your class but the base class will use the base class implementation.

http://msdn2.microsoft.com/en-us/library/ebca9ah3.aspx

The override modifier may be used on virtual methods and must be used on abstract methods. This indicates for the compiler to use the last defined implementation of a method. Even if the method is called on a reference to the base class it will use the implementation overriding it.

http://social.msdn.microsoft.com/Forums/en-US/65e02299-300f-4b74-8f0a-679f490605f5/new-vs-override-?forum=Vsexpressvcs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: