.NET code is very portable if written using classes available for both Mono and Microsoft .NET. .NET is available for Mac OS X, Linux, and Windows. Mono doesn't have any support for C++/CLI though (that I know of), but it supports C#.