public static bool IsWindows2000
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == 5) && (Environment.OSVersion.Version.Minor == 0);
}
}
//C#?ж??????????WindowsXP
public static bool IsWindowsXP
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == 5) && (Environment.OSVersion.Version.Minor == 1);
}
}
//C#?ж??????????Windows2003
public static bool IsWindows2003
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == 5) && (Environment.OSVersion.Version.Minor == 2);
}
}
//C#?ж??????????WindowsVista
public static bool IsWindowsVista
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor == 0);
}
}
//C#?ж??????????Windows7
public static bool IsWindows7
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor == 1);
}
}