[Mono-list] Mono or .NET?

Stifu stifu at free.fr
Tue Jun 15 10:08:26 EDT 2010


Hello,

Something like this:

/// <summary>
/// Checks whether the framework used is Mono.
/// </summary>
/// <returns>True (using Mono) or false (not using Mono).</returns>
public static bool IsMono()
{
	return Type.GetType("System.MonoType", false) != null;
}


SuperCiccio wrote:
> 
> How can I determine whether I am running in Mono or .NET (if I detect that
> I am in Windows through Environment.OSVersion)? I need to do different
> things in code, rather then compile different versions.
> 

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Mono-or-NET-tp2255842p2255977.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list