1.17. Exercises

  1. Research Microsoft's C# Language Tour web site at http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx.

    Cite any advantages or features of C# not mentioned in this chapter.

  2. Explore the Microsoft .NET Framework home page at http://msdn.microsoft.com/en-us/library/w0x726c2.aspx.

    Remember that C# can make use of all the libraries and other capabilities provided by the .NET Framework.

  3. Using a for loop and a continue statement, create a code snippet that will write the even numbers from 1 to 10 to the console.

  4. Using what you know about defining blocks of code and proper indentation technique, make the following code snippet more readable:

    int count = 0; for (int j = 0; j < 2; j++) { count = j; for (int k = 0; k < 3; k++) count++; Console.WriteLine("count ...

Get Beginning C# 2008 Objects: From Concept to Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.