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:Add a static method called Product to the Math class in Listing 20.1. This method must calculate the product of two parameters and be encapsulated by instances of the Calculation delegate. Write the code for testing this method with the delegate.
2:Write a program similar to Listing 20.2. This time, instead of letting a number be manipulated by three different math operations, let the program allow an initial single letter to be manipulated by the three following string operations: "Add an 'A' to the string", "Add a B to the string", and "Add a C to the string". Allow the user to put together any sequence of string operations with a maximum of twenty operations.
3:Expand Listing 20.4 with another subscriber class called ...

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