C# - Operating System Information
The .NET Framework class library exposes features of the runtime and provides other high level services. The OperatingSystem Class provides a method to copy an instance of OperatingSystem, and a method to return a string representation of operating system information.
- System.Object
- System.OperatingSystem
The OperatingSystem class is not a general purpose class and you cannot derive a more inclusive type from the OperatingSystem class. If you need a type to contain other information about an operating system, create your own type, then include a field of type OperatingSystem and any additional fields, properties, or methods you require.
The Environment Class has a property called OSVersion which returns an object of type OperatingSystem. The following C# program retrieves the current operating system information like version and platform identifier with the help of OperatingSystem Class and Environment Class.
Full Source C#- C# Types
- C# boxing and unboxing
- C# DataTypes
- C# type conversions
- C# Access Modifiers , CSharp Access Specifiers
- How to CultureInfo in C#
- How do I solve System.InvalidCastException?
- Difference between readonly and const keyword
- DateTime Format In C#
- Difference Between Task and Thread
- Object reference not set to an instance of an object
- How to Convert Char to String in C#
- How to Convert Char Array to String in C#
- How to convert int to string in C#?