The Integrated Development Environment

Although you can perform all of these writing and compiling tasks using Notepad and various command-line tools, your programming life will be much easier if you use the integrated development environment (IDE) called Visual Studio 2008. Visual Studio 2008 was designed with .NET development in mind, and it greatly simplifies the writing of C# program code. This book assumes you are using Visual C# 2008 Express or Visual Studio 2008, both of which provide the Visual Studio 2008 development environment.

Tip

The overwhelming majority of C# programmers will be building Windows and web applications for the .NET platform using Visual Studio 2008 or Visual C# 2008 Express, and we’ve tested all the examples for this book in that environment.

Excellent open source C# compilers are available, such as those from the Mono project (http://www.mono-project.com) and #develop (http://www.icsharpcode.net/OpenSource/SD/). Everything in this book should work with those compilers, but we have not tested with them and cannot guarantee 100% compatibility.

The Visual Studio 2008 IDE provides enormous advantages to the C# programmer. This book tacitly assumes that you’ll use Visual Studio 2008 or Visual C# 2008 Express for your work. However, the discussion focuses more on the language and the platform than on the tools.

Nonetheless, Chapter 2 provides an introduction to the IDE in some detail. Chapter 9 returns to the IDE to examine the debugger, which will help you find and correct problems in your code.

You can use the C# language to develop four types of applications:

Console applications

A console application runs in a console window, as you saw with Hello World. A console window (or DOS box) provides simple text-based output. Console applications are very helpful when you’re learning a language because they strip away the distraction of the Windows graphical user interface (GUI). Rather than spending your time creating complex windowing applications, you can focus on the details of the language constructs, such as how you create classes and methods, how you branch based on runtime conditions, and how you loop. We will cover all of these topics in detail in later chapters.

Windows applications

A Windows application runs on a PC’s desktop. You are already familiar with Windows applications such as Microsoft Word and Excel. Windows applications are much more complex than console applications and can take advantage of the full suite of menus, controls, and other widgets you’ve come to expect in a modern desktop application. In this book, you’ll learn how to create Windows Forms applications in Chapter 18, and the fancier WPF applications in Chapter 19.

ASP.NET applications

An ASP.NET application runs on a web server and delivers its functionality through a browser such as Internet Explorer or Firefox, typically over the Web. ASP.NET technology facilitates developing web applications quickly and easily. You’ll learn more about ASP.NET applications in Chapter 18.

Tip

For an introduction to ASP.NET, see Learning ASP.NET 3.5 by Jesse Liberty et al. (O’Reilly).

Web services

Web services are complex applications that can be accessed using standard Internet protocols, and that can provide services such as current stock quotes, ISBN-to-title conversions, and so forth that other applications can use. Web services are an advanced topic, and we won’t cover them in this book.

This book will focus primarily on the basics of the C# language, using simple console applications for most of the examples, to illustrate language fundamentals.

Get Learning C# 3.0 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.