Can a C# program be cross-platform?

C# can be compiled for and ran on multiple platforms (Windows, Linux, macOS) by using .NET Core.

Previously, cross-platform development using C# could only be done by using Mono which is a third-party implementation however it is now recommended to use .NET Core as it is developed by Microsoft.


Now C# is fully cross platform and has variety of frameworks and run times.

Java is a language + framework. But C# is just a modern language. C# language features are very powerful, easy to learn. No confusion between framework and language.

C# can be used in following frameworks

  • .Net core (Multi platform supports Linux, Windows and Mac), mostly used to develop restful services, web applications and enterprise systems
  • .Net Framework (Windows only), Same as .net core, but has more windows only features
  • Unity - One of most used game engine to develop games for PC, Sony, Xbox devices etc..
  • Xamarin - To develop native Mobile apps (Android, IOS, Mac)
  • .Net standard - Create a library in .net standard use in all above applications

Java - Code once, Ship same file to all platforms

C++, C, Rust - Code once, Compile for specific platform

C# - It is just a language, pick your framework according to requirement.

Most popular applications like Chrome, Firefox uses C++, Rust and they are compiled for each platform. But still they share the majority of code between these platforms. Some games use C++ to share the code between IOS and Android.

For new developers its good to start with NodeJS and C#. Both are easy and can do any type of applications.


It's hard to answer something like that to somebody, which states that he just starts programming, but I'll try to give you an (somewhat simplified) overview: C# is a language, which is compiled into an executable program. The language itself is portable between plattforms, as long as you have a compiler on each target plattform. On Windows you have the "default" .Net implementation and on Linux/Mac you have Mono. To do something useful - like editing files - you have to use some libraries. There is a standard library which is available on each plattform. As long as you use only that functionality, your program will be cross plattform. Obviously is will not be cross plattform, as soon as you use some library specific to a certain plattform. Editing files is part of the standard library, so you can implement such simple tools in a cross plattform way. When choosing a book, you should look for books which focus on the "raw" language and not on Visual Studio or other specific tools.