Programming in the Key of C#

A Primer for Aspiring Programmers

Programming int the key of C# Programming in the Key of C# is a tutorial for people wishing to learn the C# programming language. No prior programming knowledge is required.

ISBN: 0-7356-1800-3; Microsoft Press; August, 2003; 432 pages.

Availability

This book is available from: as well as many other real and virtual bookstores.

Companion Content

All the sample programs in Programming in the Key of C# can be downloaded from the Microsoft Press site. Simply go to the Microsoft Press page indicated above and click "Companion Content" at the right.

Using the Book

Programming in the Key of C# describes three ways you can compile the C# programs shown in the book and your own C# programs:

Visual C# .NET

Microsoft Visual C# .NET is an integrated development environment that sells for about $100.

Alternatively, you can purchase Microsoft Visual Studio .NET, which also includes .NET versions of C++, J#, and Visual Basic, as well as other features. Various versions of Visual Studio .NET cost about $1,000 and up; upgrades to previous versions of Visual Studio cost about $500 and up.

If you're running Visual C# .NET Version 2002, you can't create an Empty Project as described in the book on page 25. To add the Empty Project option to Visual C# .NET Version 2002, simply copy the text file CSharpExForEmptyProject.vsdir to the directory:

\Program Files\Microsoft Visual Studio .NET\VC#\CSharpProjects

on your hard drive. For more information about the Empty Project see this page.

The .NET Framework SDK

It's also possible to use the book without Visual C# .NET or Visual Studio .NET. You need to download and install the Microsoft .NET Framework Software Development Kit (SDK). Either version 1.0 or 1.1 is fine. It's about a hundred megabyte download. The .NET Framework SDK includes a command-line C# compiler that you can use in conjunction with a text editor such as the Windows Notepad. See Compiling C# Programs on the Command Line for more information.

You do not need to download the .NET Framework SDK if you've installed Visual C# .NET or Visual Studio .NET. The .NET Framework SDK is installed with those applications.

Key of C#

If you've installed the Microsoft .NET Framework SDK or Visual C# .NET, you can also install and run Charles Petzold's Key of C#, a Windows program for editing and compiling your C# programs.

It appears that you can even run Key of C# if all you've installed is the 20 Megabyte .NET Framework Redistributable rather than the full SDK, but if you'll be doing C# program development, you'll probably want the full SDK download.

Important C# Links

The Microsoft Developer Network (MSDN) web site has much programmer-related information and downloads.

The MSDN Library is a starting point for programmer references.

From the MSDN Library page, you can navigate to .NET Development, then Visual Studio .NET, then Product Documentation, then Visual Basic and Visual C#, then Reference, then Visual C# Language for online documents about C#, including the C# Language Specification and the C# Programmer's Reference.

From the MSDN Library page, you can navigate to .NET Development, then .NET Framework SDK, then Product Documentation, then Reference, then Class Library to obtain information about the .NET Framework namespaces, classes, etc.

To run your programs on other computers, those computers will need the Microsoft .NET Framework Redistributable. The .NET Framework Redistributable also comes with Visual C# .NET and Visual Studio .NET.

© Charles Petzold, 2003
cp@charlespetzold.com
This page last updated July, 2003