Category:C Sharp

and the .NET platform

Overview
C# is a language developed by Anders Hejlsberg in 2001. It has the following features:
 * Object-orientation
 * Generics
 * Unified Type System

Command-Line Usage: csc and msbuild
Add the appropriate paths to environment variables (see this article on MSDN) and compile using csc source.cs Alternatively, if you wish to build a  project, run something like msbuild /p:Configuration=release The  option specifies properties: /property:= Set or override these project-level properties.  is                   the property name, and  is the property value. Use a                   semicolon or a comma to separate multiple properties, or                    specify each property separately. (Short form: /p) Example: /property:WarningLevel=2;OutDir=bin\Debug\ The installed and online documentation is available using dexplore A .NET .exe contains CIL-code, which can be disassembled: ildasm something.exe

Mono
Mono is an open source implementation of the Microsoft .NET architecture, including a C# compiler (mcs) and a .NET virtual machine interpreter, (mono). Usage is simple: msc hello.cs mono hello.exe The .exe files output by mcs can be run under Windows.

Hello World
class Hello {    static void Main {        System.Console.WriteLine("Hello, world!"); } }

Specifications

 * Common Language Infrastructure (CLI): is an open specification developed by Microsoft that describes the executable code and runtime environment that form the core of the Microsoft .NET Framework. The specification defines an environment that allows multiple high-level languages to be used on different computer platforms without being rewritten for specific architectures. To clarify, the CLI is a specification, not an implementation, and is often confused with the Common Language Runtime (CLR), which contains aspects outside the scope of the specification.

Frameworks

 * .NET:The Microsoft .NET Framework is a software component that can be added to or is included with Microsoft Windows operating system. It provides a large body of pre-coded solutions to common program requirements, and manages the execution of programs written specifically for the framework. The .NET Framework is a key Microsoft offering, and is intended to be used by most new applications created for the Windows platform. The pre-coded solutions that form the framework's class library (BCL) cover a large range of programming needs in areas including: user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The functions of the class library are used by programmers who combine them with their own code to produce applications. With version 3.5 of the .NET Framework, the libraries will be released under shared-source MS-RL license. Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. This runtime environment, which is also a part of the .NET Framework, is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine, so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security mechanisms, memory management, and exception handling. The class library and the CLR together compose the .NET Framework. The framework is intended to make it easier to develop computer applications and to reduce the vulnerability of applications and computers to security threats.
 * Microsoft XNA ("XNA's Not Acronymed"):A set of tools, complete with a managed runtime environment, provided by Microsoft that facilitates computer game design, development and management. XNA does this by freeing game designers from writing "repetitive boilerplate code,"[2] and brings all aspects of game production into a single system.
 * Component Object Model (COM): is a platform for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in any programming language that supports the technology. The term COM is often used in the software development world as an umbrella term that encompasses the OLE, OLE Automation, ActiveX, COM+ and DCOM technologies. Although COM was introduced in 1993, Microsoft did not begin emphasizing the name COM until 1997. The essence of COM is a language-neutral way of implementing objects such that they can be used in environments different from the one they were created in, even across machine boundaries. For well-authored components, COM allows reuse of objects with no knowledge of their internal implementation because it forces component implementers to provide well-defined interfaces that are separate from the implementation. The different allocation semantics of languages are accommodated by making objects responsible for their own creation and destruction through reference-counting. Casting between different interfaces of an object is achieved through the QueryInterface function. The preferred method of inheritance within COM is the creation of sub-objects to which method calls are delegated. Although it has been implemented on several platforms, COM is primarily used with Microsoft Windows. COM is expected to be replaced to at least some extent by the Microsoft .NET framework, and support for Web Services through the Windows Communication Foundation (WCF). However, COM objects can still be used with all .NET languages without problems. Networked DCOM uses binary proprietary formats, while WCF encourages the use of XML-based SOAP messaging. COM also competes with CORBA and Java Beans as component software systems.

Languages

 * Common Intermediate Language (CIL): (formerly called Microsoft Intermediate Language or MSIL) is the lowest-level human-readable programming language in the Common Language Infrastructure and in the .NET Framework. Languages which target the .NET Framework compile to CIL, which is assembled into bytecode. CIL resembles an object-oriented assembly language, and is entirely stack-based. It is executed by a virtual machine. The primary .NET languages are C#, Visual Basic .NET, C++/CLI, and J#.
 * Common Language Runtime (CLR): is the virtual machine component of Microsoft's .NET initiative. It is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which defines an execution environment for program code. The CLR runs a form of bytecode called the Microsoft Intermediate Language (MSIL), Microsoft's implementation of the Common Intermediate Language.

Libraries

 * Base Class Library (BCL):a library of types and functionalities available to all languages using the .NET Framework. In order to make the programmer's job easier, .NET includes the BCL in order to encapsulate a large number of common functions, such as file reading and writing, graphic rendering, database interaction, and XML document manipulation. It is much larger in scope than standard libraries for most other languages, including C++, and would be comparable in scope to the standard libraries of Java.
 * Windows Presentation Foundation (WPF):The graphical subsystem feature of the .NET Framework 3.0 (formerly called WinFX)[1] and is directly related to XAML.[2] It is pre-installed in Windows Vista,[3] the latest version of the Microsoft Windows operating system. WPF is also available for installation on Windows XP SP2 and Windows Server 2003. It provides a consistent programming model for building applications and provides a clear separation between the UI and the business logic. A WPF application can be deployed on the desktop or hosted in a web browser. It also enables richer control, design, and development of the visual aspects of Windows programs. It aims to unify a host of application services: user interface, 2D and 3D drawing, fixed and adaptive documents, advanced typography, vector graphics, raster graphics, animation, data binding, audio and video.