[Mono-list] Is Running On Linux

Paul paul at all-the-johnsons.co.uk
Sun Jun 6 06:27:54 EDT 2010


Hi,

> I've got a program written in MS C# compiler, when running with Mono
> under Linux how can I check that am running the program under Linux
> within my program?

Simple way (which should work)

System.Environment.OSVersion and System.Environment.Version

OSVersion should return Unix (and the kernel version) and Version the
kernel version

TTFN

Paul
-- 
Biggles was quietly reading his favourite book when Algy burst through
the door. Distracted for a moment, Biggles surveyed what had happened
and turned a page. "Algy old man" he said, clearing his throat, "use the
handle next time..." - Taken from "Biggles combs his Hair"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20100606/d07fb1c7/attachment.bin 


More information about the Mono-list mailing list