Export (0) Print
Expand All

Explicit Interface Implementation Sample

This sample demonstrates how to explicitly implement interface members and how to access those members from the interface instances.

This sample contains the source code for the Explicit Interface Implementation Tutorial.

Building and Running the Sample Within Visual Studio

To build and run the Explicit Interface Implementation samples

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

Building and Running the Sample from the Command Line

To build and run the Explicit Interface Implementation samples

  1. Use the Change Directory command to change to the ExplicitInterface1 directory.
  2. Type the following:
    csc explicit1.cs
    explicit1
    
  3. Use the Change Directory command to change to the ExplicitInterface2 directory.
  4. Type the following:
    csc explicit2.cs
    explicit2
    

See Also

Explicit Interface Implementation Tutorial | Tutorial Samples

Show:
© 2014 Microsoft