Introduction to C sharp
C# is based on object- oriented programming disciplines. It is intended to be a simple and modern. C# was developed by Microsoft with Anders Hejlsberg, within its .NET initiative and it came into main appearance in 2000. The name “C sharp” was inspired by musical note where a sharp note means the written note is written in semitone higher in pitch.
It provides support for software engineering principles like strong type checking, array bounds checking and automatic garbage collection. This language is easy for those programmers who were familiar with C and C++. As we know that C is the mother of all languages.
Features of C#:
- In C# everything is an object.
- C# directly reflects the underlying Common Language Infrastructure (CLI)
- Supports operator overloading
- Garbage collection
- C# has a try…finally construct to guarantee execution of the code in the finally block, whether an exception occurs or not.
- C# does not have checked exceptions.
- Multiple inheritance is not supported in C#, although a class can implement any number of interfaces.
- C# supports a strict Boolean data type, bool.
C# & OBJECT ORIENTED APPROACH
- Switch Statement: Fall Through
- Structs & Classes
- Boxing & Unboxing
- For Each: Control Flow
- Virtual Methods
- Common Type System