What is the reason behind the invention of C#?
C# was invented by a team at Microsoft led by Anders Hejlsberg. Even though C#, is derived from C and C++, it was developed as an individual language from the ground up.
The intention behind developing C# was to create a more powerful and flexible programming language than C and C++. The team sought to add features of Object oriented programming (OOP) to the language yet keep it small and flexible. In fact, C# was originally named COOL, which stood for "C-like Object Oriented Language". Microsoft had wanted to keep this name, but it was not feasible to trademark.
C# removes some of the complexities and pitfalls of other OOP languages, including Java and C++. This includes the removal of macros, templates, multiple inheritance, and virtual base classes. These were chosen to be removed as they causing confusion or leading to potential problems for C++ developers.
However, at its core, C# is still quite similar to C and C++, and even to Java to some extent. Many aspects are taken directly C and C++, but improvements have been made to make the language simpler. One such improvement included eliminating redundancies, as well changes to the syntax.