Created
November 13, 2013 09:51
-
-
Save sholfen/7446448 to your computer and use it in GitHub Desktop.
you can use this code to check OS is 64 bit or 32 bit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
bool blIs64BitOS = Environment.Is64BitOperatingSystem; | |
if (blIs64BitOS) | |
Console.WriteLine("This is a 64bit OS"); | |
else | |
Console.WriteLine("This is a 32bit OS"); | |
bool blIs64BitProcess = Environment.Is64BitProcess; | |
if (blIs64BitProcess) | |
Console.WriteLine("This is a 64bit process"); | |
else | |
Console.WriteLine("This is a 32bit process"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment