Returns the version number of the .Net Framework available on the current computer.
// Display the version of the .NET Framework
Info("Version of .NET Framework: " + DotNetVersion())
// Is the .NET 3.0 Framework installed on the current computer?
IF DotNetVersion(dnvInstalled, "3.0") = True THEN
Info("The .NET 3.0 Framework is installed")
ELSE
Info("The .NET 3.0 Framework is not installed")
END
Syntax
<Result> = DotNetVersion([<Requested information> [, <Parameter>]])
<Result>: Character string
- Version of the .NET Framework,
- Empty string ("") if the .NET Framework is not available.
<Requested information>: Optional integer constant
Version of the .NET Framework to return: | |
dnvCurrent (Default value) | Returns the current version installed (which means the most recent version) |
dnvInstalled | Returns True if the version requested in <Parameter> is installed on the current computer. |
dnvList | Returns the list of versions installed on the current computer. The different versions are separated by CR characters. |
<Parameter>: Optional variant
If <Requested information> is set to dnvInstalled, <Parameter> is a character string containing the version whose test must be run ("3.0" for example). The version to test is compared to the different versions installed on the computer. The comparison between version numbers is a "Starts with" comparison.