C# is pronounced as C Sharp. Its name is inspired from the musical note "sharp" i.e. ♯,
which means a semitone above the note, which in technical term implies that
the C# language is a notch above the its predecessors C and C++ languages.
Looking at the hierachical picture of languages,
C# is descended from C and C++, which implies that C#(besides having added its own new set of keywords)
has inherited a lot of its syntax,
operators and keywords from the C and C++, and it has also
and inherited the object model from C++ and have further improved it.
Therefore, if you know C and C++, you will be quite easy to learn C#.
C# and Java are more like cousins
because both languages have been derived from C and C++.
Though if you know Java then many concepts of C# will be familiar and vice-versa.
Some history and present
C# was created at Microsoft during late 1990s and it was part of Microsoft's .Net initiative.
C#'s first version was released in 2000.
C#'s chief architect was Anders Hejlsberg, who created Turbo Pascal, a highly successful
software development system that
includes a compiler and an integrated development environment(IDE) for Pascal programming language.
.
C#'s current development team is led by Mads Torgersen. C#'s most recent version is 8.0
and it came out in 2019 along with its latest Microsoft Visual Studio 16.4.3 version.
The connection between C# and .NET framework
The .NET framework provides an important system called Common Language Runtime(CLR), which provides
the runtime environment and manages the execution of a C# program.
The .NET framework provides libraries of much required classes, which are used by C# to perform some important functions, such as, performing I/O operations,
creating and managing threads, working with strings, etc.
The .NET framework provides a secure environment for the execution of a C# program, which also supports
interoperability i.e. mixing different computer programming languages with C# to create a large distributed application
and it also provides for program portability.
Advantages of C#
Easy: C# is descended from C and C++, therefore, if you know C and C++, you will be quite easy to learn C#.
Moreover, C# and Java are more like cousins
because both languages have been derived from C and C++, so, if you know Java then many concepts of C# will be familiar and vice-versa.
Reliable: Important features of C# like "Automatic Garbage Collection"
frees a programmer from worrying about
memory management,
which wasn't possible with C++. Another feature of C# -- Exception Handling,
allows you to handle the erroneous
exceptional runtime situations due to which a C# program could crash
and thus boosts its reliability.
Advertisement
Platform Independent:
When you compile a C# program, the compiler creates a file that contains intermediate code called
Microsoft Intermediate Language(MSIL).
Now, this intermediate code is read and translated to an executable code by Common Language Runtime(CLR), which is a part of .NET Framework.
Therefore, any program which has been compiled to MSIL can run in an environment for which the CLR is provided.
Interoperable: C# supports
interoperability, which means that we can mix different computer programming to work with C#, which
allows us to create a different kind of applications
that could be as simple and small as a text editor and can be as big and complex as a
computer game/audio-video applications/web applications/system administration application etc.
A huge standard library :
The .NET framework provides libraries of much required classes and methods, which are used by C# to perform some important
functions, such as, performing I/O operations,
creating and managing threads, working with strings, etc.
Object-Oriented : C# is essentially an object-oriented language,
which allows us to encapsulate the data and methods
in the form of objects and classes.
Many features of OOP(Object-Oriented Programming) paradigm are also present in C#, such as :
a) Object and classes
b) Inheritance
c) Polymorphism
d) Method overriding and method overloading
Supports multiple programming paradigms :
C# is a general purpose, strongly-typed programming language, which supports
multiple-paradigms i.e. programming styles, such as -
Procedural - By writing a list of commands to execute, where the execution takes place from top to bottom.
Functional- By creating functions to pass it the raw data to get the desired result.
Object-Oriented - by encapsulating data and its behaviour into objects.