C# has been around for more than a decade now.
Microsoft developed C# as an answer to Java. Java is known for its write once, run anywhere paradigm.
With C#, and with the open source .Net framework, you can indeed run C# code in Mac and Linux.
To run C# program in other platforms such as Mac and Linux, you need the Mono software platform.
Mono is an open source, cross-platform implementation of C#. The CLR or the Common Language Runtime, an interpreter, is binary compatible with Microsoft.NET
Mono is a software platform designed to allow developers to easily create cross-platform applications. It is an open source implementation of Microsoft’s .Net Framework based on the ECMA standards for C# and the Common Language Runtime.
You can for example, develop iOS apps using C# by using the Xamarin software development tools.