The Simple and COOL History of C#

 

The Simple and COOL History of C#

When .NET Framework was in its cradle the class libraries were created with the Simple Managed C (SMC) managed code compiler. In 1999 a group, led by Anders Hejlsberg, was formed to create a C-like Object Oriented Language that was dubbed COOL. The name was changed to C# for trademark reasons in 2000, by then the class libraries and the ASP.NET run-time had been rewritten with the new C# language.

It didn’t come as a shock to anyone when the creator of the Java language, James Gosling, insisted that C# was a copy of Java with security, reliability and productivity removed. Anders Hejlsberg retorted with that the C# design resembles C++ more than Java.

When C# 2.0 was released in 2005 the two languages went down two very different paths when implementing generics; in C# generics are implemented as first-class generic objects where as in Java generics are more like a language syntax feature.

In 2008 when C# 3.0 was released LINQ extensions was added to make it possible to code in a functional-style way using Lambda expressions, extension methods and anonymous types. LINQ with its standardized, declarative query syntax has made it much easier to query a variety of data sources such as databases, collections and xml; any source that is enumerable.

In this release it was also made possible to declare implicit variables using the var keyword which uses the assigned value to determine the data type. Once a value has been assigned the data type cannot change.

In the 2010 release of C# 4.0 dynamic late binding was introduced; dynamic objects are mainly used to call dynamic languages and unmanaged code. In cases when you want or need to use dynamic variables that are not bound to the static variable declaration of C# you can use dynamic objects that are not checked until run-time.

Optional parameters and named arguments were also introduced. When named arguments are used in conjunction with optional parameters named arguments makes it easy to omit method parameters, omited optional parameters will receive their default values.

In the C# 5.0 release in 2011 a much easier and less code heavy way of implementing asynchronous calls was introduced where you use the async and await keywords. Calling methods asynchronously means that you for instance can free up the UI when a long running task is executing, or execute methods or run loops in parallel.

A set of special parameter attributes that can aid in debug and trace scenarios were also added. The attributes CallerName, CallerFilePath and CallerLineNumber will be replaced by debug information by the C# compiler at run-time.

The unit testing framework and engine was completely rewritten to make it faster and more in sync with what was needed for Test Driven Development (TDD).

Visual Studio 2012 Features

Visual Studio 2012 enables you to build applications, components and services using different programming languages and rapid design, implementation, building, testing and deployment.

Visual Studio has different views suited for different needs. You can use the Design views to build user interfaces, or if you want more control, you can use the Code Editor views. There are also wizards available for certain tasks to speed up the development.

The Server Explorer window enables you to log in to servers and access data and services. You can also create access and modify databases in a similar way in the Visual Studio IDE.

Visual Studio 2012 ships with a lightweight version of Internet Information Services (IIS) as a default web server that you can use to debug your web applications.

With the debugging features, you can easily follow execution paths using breakpoints and the ability to step through your code.

The Error List window displays errors, warnings and messages that are generated when you edit and build your code.

Coding is made more effective with InteliSense, which displays a list of matching names and code snippets that completes the code for you by inserting it in place of a key word.

Help is always close at hand by using the integrated help feature or the online MSDN help library.

What is the .NET Framework?

You can use the .NET Framework 4.5 with Visual Studio 2012, a fast and efficient development platform that enables you to create applications and services. You can utilize several different solution types to create solutions for a broad range of devices.

.NET Framework consists of three main parts:

  • The Common Language Runtime (CLR)
  • The .NET Framework class library
  • A collection of development frameworks

The Common Language Runtime (CLR)

The Common Language Runtime is a robust and highly secure execution environment that manages the execution of code. The CLR includes:

  • Memory management
  • Transactions
  • Multithreading

The .NET Framework class library

The .NET Framework is a class library containing common functionality and constructs that you can use when building applications. Instead of reinventing functionality you can simply reuse already existing functionality. You can also, of course, create your own class libraries that can be reused.

System.IO.File is one example of an existing class that is ready to be utilized; this particular class contains functionality to manipulate files in the Windows file system.

Development frameworks

There are several different development frameworks ready to be used when building common application types. Each framework contains the necessary components and  infrastructure to get a project started.

  • Windows Presentation Foundation (WPF) – Desktop applications
  • XAML – Windows 8 desktop applications
  • Active Server Pages (ASP.NET) Web Forms – Server-side web applications
  • NET MVC – Server-side web applications
  • Windows Communication Foundation (WCF) – Server-oriented web applications
  • Windows Services – Long-running applications

 

Stay connected with news and updates!

Join our mailing list to receive the latest news and updates from our team.
Don't worry, your information will not be shared.

Subscribe
Close

50% Complete

Two Step

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.