This chapter discusses the tools required for C# programming. We've mentioned that C# is part of the .NET Framework and is used for writing .NET applications. Before discussing the available tools for running C# programs, let's understand the relationship between C# and the .NET Framework.
.NET Framework
The .NET Framework is an innovative platform that helps you write the following types of applications:
- Windows applications
- Web applications
- Web services
.NET Framework applications are multi-platform. The framework is designed to be used with various languages such as C#, C++, Visual Basic, JScript, COBOL, and more. All these languages can access the framework and interact with each other.
The .NET Framework consists of a large code library for client languages like C#. Some components of the .NET Framework include:
- Common Language Runtime (CLR)
- .NET Framework Class Library
- Common Language Specification
- Common Type System
- Metadata and Assemblies
- Windows Forms
- ASP.NET and ASP.NET AJAX
- ADO.NET
- Windows Workflow Foundation (WF)
- Windows Presentation Foundation (WPF)
- Windows Communication Foundation (WCF)
- LINQ
For detailed information on each component, refer to Microsoft's documentation.
Integrated Development Environment (IDE) for C
Microsoft provides the following development tools for C# programming:
- Visual Studio 2010 (VS)
- Visual C# 2010 Express (VCE)
- Visual Web Developer
The latter two are free and can be downloaded from Microsoft's official website. These tools allow you to write various C# programs, from simple command-line applications to more complex ones. You can also use a basic text editor like Notepad to write C# source code files and compile the code into components using the command-line compiler, which is part of the .NET Framework.
Visual C# Express and Visual Web Developer Express are customized versions of Visual Studio with the same look and feel. They retain most of Visual Studio's features. In this tutorial, we use Visual C# 2010 Express.
You can download it from Microsoft Visual Studio. It will automatically install on your machine. Note that you need a working internet connection to complete the installation of the Express edition.
Writing C# Programs on Linux or Mac OS
Although the .NET Framework runs on Windows, there are versions available for other operating systems. Mono is an open-source version of the .NET Framework that includes a C# compiler and runs on multiple operating systems, such as various versions of Linux and Mac OS. For more details, visit Go Mono.
Mono aims to run Microsoft .NET applications cross-platform and provides better development tools for Linux developers. Mono can run on various operating systems, including Android, BSD, iOS, Linux, OS X, Windows, Solaris, and UNIX.