O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Overriding Virtual Members

Overriding a virtual member is done by means of the override keyword. When you type the keyword in the Visual Studio integrated development environment (IDE), IntelliSense provides a list of members that can be overridden, as shown in Figure 14.11.

Image

FIGURE 14.11 Use of the override keyword.

As soon as we pick a member from the list presented to us, Visual Studio generates a default implementation that does nothing but defer execution to the base class implementation, as shown in Figure 14.12.

Image

FIGURE 14.12 Default implementation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required