.NET 2.0 Framework in C# check if 64bit os if so do this? if not do this? better answer?
Posted
by NightsEVil
on Stack Overflow
See other posts from Stack Overflow
or by NightsEVil
Published on 2010-06-08T05:01:55Z
Indexed on
2010/06/08
5:12 UTC
Read the original article
Hit count: 183
hi i have this little snippet of code i wrote that checks to see if a folder is present (only exists in x64) if so it does "X" commands, if not (i.e x86) does "Z" commands (x,Z are just markers for code) but what i wanna know is there a better or more reliable way to do this using only the 2.0 .net Framework?
string target = @"C:\Windows\SysWow64";
{
if (Directory.Exists(target))
{
//do x64 stuff
}
else
{
//do x86 stuff
}
© Stack Overflow or respective owner