Home > Articles > Programming > C#

  • Print
  • + Share This
This chapter is from the book

Exercises

  1. Write a console application that generates the truth table shown in Table 2.12.
  2. Write a console application that demonstrates the difference between value types and reference types. The application should declare two integer variables and two object variables of type LightHouse. For the object variables, create a new class file named LightHouse.cs and replace the generated code for LightHouse with the following code:

    public class LightHouse
    {
        public int NumberOfLights = 1;
        public int RevolutionsPerMinute = 30;
    }
  3. Expand the console application you wrote in the Arithmetic Operators Try It Yourself exercise to explore how the postfix and prefix increment and decrement operators behave.
  • + Share This
  • 🔖 Save To Your Account