C #, Microsoft Java

C # is easier to use than C++, but running programs requires .NET runtime. You can easily convert your C++ code.

C # was developed by Microsoft in 2000 for its new .NET platform as an alternative to Java, taking inspiration (like it) from C++, Java, and several other languages. It repeats most of the principles of Java, with a clearer focus on the object.
Over time, it has received features that go far beyond what Java offers. It implemented generic programming long before Java. It also allows parallel programming, has an event programming structure (the so-called unintentional reaction).

C # can be compiled into a binary language in executable form with the new Roslyn compiler or other tools (see links below).

On .NET, you can mix C # code with code from other languages, they work together, sharing the same objects. Many languages have been implemented, including C++, Pascal, Python, Java, and even Cobol and Fortran .

From Windows to Linux

The future of the language was not fully determined outside of Windows until the announcement in April 2014. Previously, one might have thought that its implementation in Silverlight, seen as a future platform for the Internet and mobile devices, would make it one of the key languages ​ ​ for programming the future. Then Microsoft, with Metro/Modern UI, a platform for Windows 8, turned to HTML 5 and JavaScript (next to XAML and C #).
Therefore, c # does not seem to be the only language considered by Microsoft for its immersive applications.
In addition, Microsoft has created a TypeScript language with classes, interfaces and modules that compiles into JavaScript, which reinforces its importance.

But in 2014, Microsoft announced that the new Roslyn compiler was open source, as well as a significant portion of .NET tools, and that it would be managed by an independent foundation. This makes it much easier to use on all platforms.
So this is a classic desktop application language, as well as for mobile, so it is universal (there is even a micro-framework for built-in systems).

Features and differences from C++ and Java

C # is compiled in an intermediate language, CIL (Common Intermediate Language), which runs on a virtual machine, CLR (Common Language Runtime). This is an implementation of CLI, a common language infrastructure. But in his native it can be composed as C++.

The main difference from C++ is the use of a collector garbage truck for memory management.

Compared to Java, where each class is stored in a separate file, this restriction does not exist for C #.

Example code C #: Displays the characters of two connected texts.

 string s = "demo" + "suffixe";
 foreach (char c in s){ 
   System.Console.WriteLine(c); 
 } 

Development tools

Microsoft provides a complete free development environment, Visual Studio Express, and there are several open source alternatives.

Visual Studio Community
The C # compiler is enabled.

Mono Develope
IDE for C # and other specialized .NET languages.

VFlat
C # compiler in native code, for Windows, Linux, compatible with .NET 7. Produces executable files.

Roslyn
Microsoft C # compiler source code included in Visual Studio.

Own AOT
Runtime for native applications on Windows, Macou Linux.