This documentation is archived and is not being maintained.

Operator Overloading Sample

This sample demonstrates how user-defined classes can overload operators.

This sample contains the source code for the Operator Overloading Tutorial.

Building and Running the Sample Within Visual Studio

To build and run the Operator Overloading samples

  1. Open the solution (OperatorOverloading.sln).
  2. In Solution Explorer, right-click the Complex project and click Set as StartUp Project.
  3. From the Debug menu, click Start Without Debugging.
  4. Repeat the preceding steps for Dbbool.

Building and Running the Sample from the Command Line

To build and run the Operator Overloading samples

  1. Use the Change Directory command to change to the Complex directory.
  2. Type the following:
    csc complex.cs
    complex
    
  3. Use the Change Directory command to change to the Dbbool directory.
  4. Type the following:
    csc dbbool.cs
    dbbool
    

See Also

Operator Overloading Tutorial | Tutorial Samples

Show: