Possible Duplicate:
How to detect Windows 64 bit platform with .net?
I would like to read keys of the Uninstall subkey of Windows registry. 
So in order to do that, I need to check the bit edition of OS, is the following code sufficient or not?
        public enum OSEdition
        {
            Bit32,
            Bit64
        };
        public static OSEdition GetOSEdition
        {
            get
            {
                if (System.IntPtr.Size == 8)
                {
                    return OSEdition.Bit64;
                }
                else
                {
                    return OSEdition.Bit32;
                }
            }
        } 
 
    