C# OperatingSystem ServicePack
Description
OperatingSystem ServicePack
gets the service pack version
represented by this OperatingSystem object.
Syntax
OperatingSystem.ServicePack
has the following syntax.
public string ServicePack { get; }
Example
The following code example demonstrates the ServicePack property.
using System;/*w w w .j a v a2s . c om*/
class Sample
{
public static void Main()
{
OperatingSystem os = Environment.OSVersion;
String sp = os.ServicePack;
Console.WriteLine("Service pack version = \"{0}\"", sp);
}
}
The code above generates the following result.