Some details in these instructions are specific to Windows XP. Installation on other Windows systems (2000, NT, ME ...) will be similar but may differ in some details.
You will need Administrator privileges to complete the steps listed here.
The C# compiler, which can be invoked from a command window, is included free with the Microsoft .Net Framework SDK. If you also require an interactive development environment (IDE) to use with the C# compiler, some additional help is provided below.
Two separate downloads from Microsoft are required.
Version 2.0 is the newest version. It supports several additions
to the C# language which are not described in the book.
However, all the book's programs work unchanged with version 2.0
and there is no reason not to install it.
Version 2.0 can be downloaded from this URL:
http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
You should save the downloaded file on your system and execute it.
Second, install the .NET Framework SDK.
Again, there are two version, 1.1 and 2.0.
If you chose Version 1.1 for step 1, above, you will need
to install version 1.1 of the SDK.
It can be found at this URL:
http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en
If you chose version 2.0, you can download the SDK version 2.0
from this URL:
http://www.microsoft.com/downloads/details.aspx?FamilyID=FE6F2099-B7B4-4F47-A244-C96D69C35DEC&displaylang=en
Again, save the downloaded file and execute it.
Once you have completed the two installs, you will have the Microsoft .Net Framework and the SDK (Software Development Kit) for .Net on your computer. The SDK installation includes the C# compiler. It will exist as a file named csc.exe. If you have accepted all the defaults for the installation, it will be located in a folder with a name similar to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 or to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 (depending on which version of the .NET Framework was installed) where the trailing four or five digit number may be different if there has been a recent minor upgrade. If necessary, you can use the Search command under the start menu to locate the folder which contains the file named csc.exe.
Assuming the folder paths given above, the C# compiler can be invoked in
a command-line window by typing one of the commands:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc filename.cs
or
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc filename.cs
where filename.cs is the C# source code file to be compiled.
To make command-line usage more convenient, you can add the folder name to the end of the PATH environment variable. On Windows XP, the PATH variable is accessed from the System control panel:
You can use any text editor, including NotePad and EditPad, to create
and edit C# files.
You just have to give the filenames the .cs extension
instead of the default .txt extension.
The EditPad editor is available from this URL:
http://www.editpadlite.com/
You can use a combination of a text editor and an open command window. (A command window can be opened by typing the word cmd in the Run... dialog box found in the start menu.)
For developing and debugging large C# programs, an interactive development environment (or IDE) is recommended.
Here are some possibilities.
Visual Studio 2005 | This is the standard IDE from Microsoft. However it costs money, and it has a large memory footprint. Students and faculty at educational institutions enrolled in the MSDNAA (Microsoft Developer Network Academic Alliance) can obtain copies of Visual Studio 2005 at no additional cost. Instructions for downloading and installing MSDNAA software should be obtained through your educational institution. | |
#develop | #develop (pronounced sharp develop) is an IDE for C# which is open source and therefore free. It is entirely programmed in C# itself and runs in the Windows .Net environment. Both the executable and the source code may be downloaded from the following URL: http://www.icsharpcode.net/. | |
Eclipse | Eclipse is a generic IDE, usable for several programming
languages, which requires that a separate C# plugin be downloaded.
Eclipse may be downloaded from this URL:
http://www.eclipse.org
Eclipse is a large Java program (about 115MB); your system must therefore
also have the Java run-time environment installed.
A C# plugin is available as
Improve C# editor | |
Antechinus | This is a C# Editor with simple IDE features. It is available from
this URL for US$49.95: http://www.c-point.com/csharp.htm It has to be purchased. |