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.
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.
|Jan 2002 C Sharp 1.0||Modern|
Type-Safe Programming Language
|Nov 2005 C Sharp 2.0||Generics|
|Nov 2007 C Sharp 3.0||Implicit Typed Local Variables|
Object and Collection Initializers
Auto Implemented Properties
|April 2010 C Sharp 4.0||Dynamic Binding |
Named and Optional Argument
|Aug 2012 C Sharp 5.0||Asynchronous Programming|
Caller Info Attribute
|July 2015 C Sharp 6.0||Compiler as a service (Roslyn)|
Import of Static Type Members into Namespace
Await in Catch / Finally Block
Auto Property Initializers
Default values for getters and Properties
Expression Bodied Members
Null Conditional Operator
Name of Operator
|Mar 2017 C Sharp 7.0||Binary Literals|
Improved Out Variables
Arbitrary Async Return
|Sep 2019 C Sharp 8.0||Disposable Ref Structs|
Stackalloc in Nested Expressions
Unmanaged Constructed Types
Indices and Ranges
Static Local Functions
Enhancement of Interpolated Verbatim Strings
Asynchronous Streams / Asynchronous Disposable
Pattern Matching Enhancements
Nullable Reference Types
Default Interface Methods
|C Sharp 9.0 To be released soon||Init-only properties|
Init accessors and read-only fields
Records and mutation
With-expressions and inheritance
Value-based equality and inheritance
Improved pattern matching
Simple type patterns
Improved target typing
Target-typed new expressions
Target typed ?? and ?:
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!