Export (0) Print
Expand All

Structs Sample

This sample presents the syntax and usage of structs. It also covers the important differences between classes and structs.

This sample contains the source code for the Structs Tutorial.

Building and Running the Sample Within Visual Studio

To build and run the Structs samples

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

Building and Running the Sample from the Command Line

To build and run the Structs samples

  1. Use the Change Directory command to change to the Struct1 directory.
  2. Type the following:
    csc struct1.cs
    struct1
    
  3. Use the Change Directory command to change to the Struct2 directory.
  4. Type the following:
    csc struct2.cs
    struct2
    

See Also

Structs Tutorial | Tutorial Samples

Show:
© 2014 Microsoft