Is my code compiled on Mono (or Microsoft .NET)?
If you want to distinguish between your .NET program compiled on Mono and your program compiled on Microsoft Windows you can use the “__MonoCS_” pre-processor flag!
using System;
using System.IO;
using System.IO;
public class AmIMono
{
public static void Main()
{
#if __MonoCS__
Console.WriteLine("Hello Mono!
");
#else
Console.WriteLine("No Mono!
");
#endif
}
}
mcs test.cs ./test.exe
via btk
Recent Entries
- Is my code compiled on Mono (or Microsoft .NET)?
- Definition of C#
- Google Wave – A Revolution done wrong!
- C# and implicit conversions
- Mein Cluster hat vier Räder ;)
- OpenVPN and Windows7
- M$ SharePoint and Symlinks…
- Die sones GmbH sucht weitere engagierte Softwareentwickler
- Detexify2 – Latex symbol classifier
- Piratenspot “Klarmachen zum Ändern” 2009