Versioning Sample

This sample demonstrates versioning in C# through the use of the override and new keywords. Versioning helps maintain compatibility between base and derived classes as they evolve. For additional information, see Versioning with the Override and New Keywords (C# Programming Guide).

Security Note This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices.

To build and run the Versioning sample within Visual Studio

  1. Open the solution (Versioning.sln).

  2. From the Debug menu, click Start Without Debugging.

To build and run the Versioning sample from the Command Line

  • Type the following at the command prompt:

    csc versioning.cs
    versioning