C# Program to Check Whether Running Process is 64-bit Process or Not Using Environment Class
Environment Class provides information about the current platform and manipulates, the current platform. It is useful for getting and setting various operating system-related information. We can use it in such a way that retrieves command-line arguments information, exit codes information, environment variable settings information, contents of the call stack information, and time since last system boot in milliseconds information. In this article, we can check which process is running in our system using the Is64BitProcess property of the Environment Class. This method is used to check whether the current process is the 64-bit process or not. If the current process is a 64-bit process then it will return true otherwise it will return false.
Return Type: The return type of this property is boolean. It will return true if the process is a 64-bit process. Otherwise, return false.
In this example, we are running our code on a 64-bit machine.
The current process is 64-bit process
In this example, we are running the same code on a 32-bit machine and we get a different output because now the process is 32-bit.
The current process is not 64-bit process