O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Programming Exercises

1:Recall your first object-oriented source code SimpleElevatorSimulation.cs in Listing 5.1 of Chapter 5, “Your First Object-Oriented C# Program.” It contained three classes in the same compilation unit. In hindsight, it didn't follow the standard convention of one class per compilation unit. Rectify this problem and rewrite the program so that it more correctly contains three compilation units, each with its own class (Elevator, Person, and Building) and all classes properly structured inside a neat namespace hierarchy. Turn these three compilation units into a DLL assembly. (Hint: You should rename the Main method from the Building class, because this new DLL is for reuse only). Write another source file that performs an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required