VB
Public Shared Function Win7CurrentOS() As Boolean
If Environment.OSVersion.Version.Major = 6 And Environment.OSVersion.Version.Minor = 1 Then
Return True
Else
Return False
End If
End Function
C#
static bool Win7CurrentOS()
{
if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 1)
{
return true;
}
else
{
return false;
}
}