C# is directly related to C and C++. This is not just an idea, this is real. As you recall C is a root for C++ and C++ is a superset of C. C and C++ shares several syntax, library and functionality. In addition structures, unions, arrays, strings and pointers are most important and similar functionality for both languages. C# inherits most of its operators, keywords, and statements directly from C++. Enums are clearly a meaningful concept in C++. Finally I can clearly say that C# is the first component-oriented language in the C/C++ family. C# constructors are very similar with C++ constructors. Like C++, methods are non-virtual by default, but can be marked as virtual. There is also some difference between C# and C++, C# supports multiple inheritance of interfaces, but not of classes. Another difference is destructors, their syntax is same with C++ but actually they are very different.
Most of the C# basic types have the same names as C++ basic types but they are not really same. For example a char in C# is equivalent to a wchar_t in C++. If you decide to move from C++ to C# there are a few things to watch out to include the changes to new, structs, constructors, and destructors. Creating and using a component (DLL) in C# is fairly easier than in C++. One more thing, Borland's C++ Builder was a pure C++ with simple RAD environment of Delphi and VB. C++ Builder was not a new language. This is one of the biggest differences between C++ Builder and C#. The CLR (Common Language Runtime) improves runtime interactivity between program development simplicity, security and portability. However CLR gives usability for cross-language integration. In addition to all those CLR has a perfect foundation for a rich set of class libraries.
Comments