Microsoft's .NET runtime and C# compiler have been open source and cross platform for a long time now. Even before then, MS published ECMA standards for .NET and C# since the beginning, and the Mono runtime and compiler for C# have been open source and cross platform since the early 2000s: