History and Features of C#

Short History of C#

Back in 1999, Java was already popular. Microsoft was thinking of designing a new programming language that can beat Java. An engineer named Anders Hejlsberg at Microsoft sat down with his team and started discussions. Initially, the libraries of C# were written in a Managed code compiler system called Simplified Managed C, popularly called as SMC. Later on, the libraries of .Net runtime were ported to C# from SMC.

C#

You will be surprised to know the initial name of C# was COOL which stands for C like Object Oriented Langauge. Microsoft was considering the same name when the language released but due to many marketing and trademark-related reasons, it could not do so.

Resemblance with Java

James Gosling, the developer of the Java programming language stated that the C# language brings no innovation to the table because its features are very much similar to Java. The style of writing code and syntaxes are identical to Java. Later on, the two languages took completely different shapes.

Many people do not know why the language has a # symbol in its name. Microsoft decided to keep a # symbol in the name for two reasons. The # symbol comes from the musical node # that means higher in pitch.

The symbol # resembles 4 Plus signs (++++) in two by two grid which means C# is an incrementation of C++ language. Microsoft also mentioned on several occasions that C Sharp will be closer to C++, not Java.

C# Release History

The first version of C Sharp released with .Net Framework in 2002. Since then the language has been upgraded many times. Below is the history.

C# timeline

YearFeatures
Jan 2002 C Sharp 1.0Modern
Object-Oriented
Type-Safe Programming Language
Nov 2005 C Sharp 2.0Generics
Partial Classes
Anonymous Types
Integrators
Nullable Types
Static Classes
Delegate Interface
Nov 2007 C Sharp 3.0Implicit Typed Local Variables
Object and Collection Initializers
Auto Implemented Properties
Anonymous Types
Extension Methods
Query Expressions
Lambda Expression
Expression Trees
Partial Method
April 2010 C Sharp 4.0Dynamic Binding 
Named and Optional Argument
Generic Co-Variance 
Contra Variance
Aug 2012 C Sharp 5.0Asynchronous Programming
Caller Info Attribute
July 2015 C Sharp 6.0Compiler as a service (Roslyn)
Import of Static Type Members into Namespace
Exception Filter
Await in Catch / Finally Block
Auto Property Initializers
Default values for getters and Properties
Expression Bodied Members
Null Conditional Operator
String Interpolation
Name of Operator
Dictionary Initializer
Mar 2017 C Sharp 7.0Binary Literals
Digit Separators
Local Functions
Type Switch
Ref Return
Tuples
Decomposition
Improved Out Variables
Pattern Matching 
Arbitrary Async Return
Records
Sep 2019 C Sharp 8.0Disposable Ref Structs
Stackalloc in Nested Expressions
Unmanaged Constructed Types
Indices and Ranges
Static Local Functions
Null-coalescing Assignment
Enhancement of Interpolated Verbatim Strings
Using Declarations
Asynchronous Streams / Asynchronous Disposable 
Pattern Matching Enhancements
Nullable Reference Types
Default Interface Methods
C Sharp 9.0 To be released soonInit-only properties
Init accessors and read-only fields
Records
With-expressions
Value-based equality
Data members
Positional records
Records and mutation
With-expressions and inheritance
Value-based equality and inheritance
Top-level programs
Improved pattern matching
Simple type patterns
Relational patterns
Logical patterns
Improved target typing
Target-typed new expressions
Target typed ?? and ?:
Covariant returns

The above features of C# 9.0 will be coming very soon as per Mads Torgersen as per his blog at the Microsoft site. Let us see how things shape up when the final version comes out. I hope the article was helpful.

Stay Home Stay Safe in this Covid time. Take Care, Cheers!