W
William Stacey
Is there a better way to get a double (or other) for os version then this?
I want to get os version early in program,
then do checks like: if ( osVersion < 5.2 ) //do something. TIA
int major = Environment.OSVersion.Version.Major;
int minor = Environment.OSVersion.Version.Minor;
try
{
double dver = Double.Parse(major.ToString() + "." + minor.ToString());
return dver;
}
catch
{
//Do something;
}
I want to get os version early in program,
then do checks like: if ( osVersion < 5.2 ) //do something. TIA
int major = Environment.OSVersion.Version.Major;
int minor = Environment.OSVersion.Version.Minor;
try
{
double dver = Double.Parse(major.ToString() + "." + minor.ToString());
return dver;
}
catch
{
//Do something;
}