C# Program to Check if Operating System is 64-bit OS or Not Using Environment Class Last Updated : 01 Nov, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 will discuss how to check whether running operating systems is 64 bit OS or not using Environment class. So we need to use the Is64BitOperatingSystem property of the Environment class. This property is used to check whether the running operating system is based on 64-Bit architecture or not and returns true if it is 64-bit OS otherwise it will return false. Syntax: Environment.Is64BitOperatingSystem Return Type: The return type of this property is Boolean. It returns true if the OS is 64-bit OS. Otherwise, it will return false. Example: C# // C# program to check whether the given // OS is 64-bit Os or not. Using the // Environment class using System; class GFG{ static public void Main() { // Declaring a variable of bool type // to store the result bool outresult; // Now we determine the current operating system // is 64-bit OS or not. Using the Is64BitOperatingSystem // property of Environment class outresult = Environment.Is64BitOperatingSystem; // Display the result if (outresult == true) Console.WriteLine("Yes! the current operating " + "system is 64-bit OS"); else Console.WriteLine("No! the current operating " + "system is not 64-bit OS"); } } Output: Operating System is based 64-bit architecture When we run the same code in the 32-bit system then the output will be: Operating System is not based 64-bit architecture Comment More infoAdvertise with us Next Article C# Program to Get the Memory Size For OS Page File using Environment Class O ojaswilavu8128 Follow Improve Article Tags : C# CSharp-programs Similar Reads 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, environme 2 min read C# Program to Get the Memory Size For OS Page File 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, environme 2 min read C# Program to Get the Operating System Version of Computer using Environment Class In C#, 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 it retrieves command-line arguments information, exit codes information, 2 min read C# Program to Check Whether the CLR is Shutting Down or Not Using Environment Class In C#, 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 it retrieves command-line arguments information, exit codes information, 2 min read C# Program to Check Whether a Process is Running in User Interactive Mode or Not Using Environment Class In C#, 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 it retrieves command-line arguments information, exit codes information, 2 min read C# Program to Get the Machine Name or Host Name 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, environme 1 min read Like