Using C#, how to get whether my machine is 64bit or 32bit?
问题 Using C#, I would like to create a method that retunrs whether my machine is 64 or 32-bit. Is there anybody who knows how to do that? 回答1: System.Environment.Is64BitOperatingSystem 回答2: System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE") see this question. 回答3: Here it is: How to detect Windows 64-bit platform with .NET? Quote: bool is64BitProcess = (IntPtr.Size == 8); bool is64BitOperatingSystem = is64BitProcess || InternalCheckIsWow64(); [DllImport("kernel32.dll",