checking the running os in c#
I have a project developed in visual studio. and it is hosted on remote windows server for running. I have written some code which does specific things based on the os (windows , Mac ). but when I access the site via URL in Mac...it always executes the windows specific code. what might be the reason....?
jayabhargava rPosted Nov 24, 2012, 2:22 PM
else
console.Writeline("Mac/Linux environment");
console.Writeline(Environment.OSVersion.VersionString);
...according to these lines of code in mac os i am not getting else part result.. and
Environment.OSVersion.VersionString is displaying the value as : Microsoft Windows NT 6.1.7601 Service Pack 1..
so what might be the problem?
Mahesh ChandPosted Nov 24, 2012, 11:16 AM