C#

The Bonus Site for C# For Dummies
csharp102.info

Code Examples for C# 2008 For Dummies

The book includes well over 100 small example programs, each focused on demonstrating one idea, one technique, or one piece of C#. They used to be provided on a CD, but this time around we decided to put them on a Web site. You can download them below.

For information about additional code examples in the 2010 book, see www.dummies.com.

IMPORTANT! Almost all of the code accessible here is for the 2008 book. But all of it should still work for the 2010 book.

NEW: More Examples - See below.

Notes for Downloading

Downloads

Download all of the example code for C# 2008 for Dummies (466K download).

Download the code for a particular chapter:

Code for the seven Bonus Chapters is included when you download a bonus chapter.

More Examples

Big Piglatin

This little application lets you translate any text into Pig Latin.

Download Source Code and Build It Yourself

Tip: Right-click the downloaded BigPigLatinSourceCode.zip file and choose Extract All. In the Extract Compressed (Zipped) Folders dialog, navigate to the Projects folder under your Visual Studio 2008 installation, create a new folder, and click Extract. In the new Projects folder, double-click the .SLN file to open the solution. Read through the code to see what it does. Note that this is a Windows Forms application. If you have the free NUnit testing tool (www.nunit.com), you can build this application, open NUnit, use File/Open Project to open the PigLatinTests.dll file under the PigLatinTests project's bin\Debug folder. Press F5 to run all of the tests. Then you can run the program and give it some text to translate into Pig Latin.

Code Fixes from Book Errata

Corrected code for ConvertTemperatureWithRoundoff, page 32 in the 2008 book.

Notes for Downloaders

Note: All downloads are in the form of .ZIP files. You'll need to extract them to a directory on your hard drive.

Go to Top