C # (pronounced ” C Sharp “) is a programming language developed by Microsoft.
It was introduced in Microsoft’s .NET Framework in the name of version 1.0 in 2002 . Since then C # has gone through a lot of revisions, which happen with every .NET update.
In today’s time, it is one of the very popular programming languages that is used to create Windows programs and web applications.
C # is actually a derivative of C programming languag e and is very similar to C ++. While it uses some basic operators like C ++ , it is also object oriented, case sensitive, and the same identical syntax is often found in it.
But still there are many differences between C # and C ++ . Let us understand about them with examples.
1. Arrays in C ++ are called pointers, while in C #, these are objects that have methods and properties.
2. It does not recognize the bool (boolean) data type as an integer like it is done in C ++.
3. The keywords typedef, extern, and static all have different meanings in C #, which are completely different in C ++.
4. C # switch statements do not support fall-through from one case to another.
5. Global methods and variables are not supported in C #, whereas they are done in C ++.
Most importantly, C # is designed specifically for Microsoft’s .NET Framework . Therefore, it allows developers to use all the features offered by the .NET API.
But it also means that C # applications can only run in such platforms which supports .NET runtime, such as Windows , Windows Server, and Windows Phone .
At the same time you want to run programs that are written in C # on one of their other platforms, then in such a way, these codes have to be compiled using a conversion tool such as Microsoft .NET Native.
NOTE The name “C #” originates from the musical note “C♯,” which indicates that this step up took place from the original version of C. This ♯ symbol is also made up of four plus signs, which implies that C # is more advanced than C ++.