I am not sure if this is what you are looking for but I check the IntPtr.Size to detect 32bit versus 64bit runtime. Note that this tells you the runtime environment, you might be running in WOW64
if (IntPtr.Size == 4)
{
//32 bit
}
else if (IntPtr.Size == 8)
{
//64 bit
}
else
{
//the future
}