Can I compile .NET C# code on my Mac?
Check out the Mono Project. It may be what you are looking for.

http://www.mono-project.com/Mono:OSX

MonoDevelop is a cross-platform IDE primarily designed for C# and other .NET languages. MonoDevelop enables developers to quickly write desktop and ASP.NET Web applications on Linux, Windows and Mac OSX. MonoDevelop makes it easy for developers to port .NET applications created with Visual Studio to Linux and Mac OSX maintaining a single code base for all platforms.