C# OperatingSystem VersionString
Description
OperatingSystem VersionString
gets the concatenated
string representation of the platform identifier, version, and service
pack that are currently installed on the operating system.
Syntax
OperatingSystem.VersionString
has the following syntax.
public string VersionString { get; }
Example
The following code example demonstrates the VersionString property.
//from ww w .j av a 2s .c o m
using System;
class Sample
{
public static void Main()
{
OperatingSystem os = Environment.OSVersion;
Console.WriteLine("This operating system is {0}", os.VersionString);
}
}
The code above generates the following result.