Name
ScriptEngineMajorVersion Property
Class
Microsoft.VisualBasic.Globals
Syntax
ScriptEngineMajorVersion
Return Value
An Integer containing the major version number
Description
Indicates the major version (1, 2, etc.) of the programming language currently in use
Rules at a Glance
The initial version of VB.NET returns “7” as its major version number.
Programming Tips and Gotchas
This property is implemented as a function in the JScript scripting engine.
If your script requires some functionality available in a baseline version, ordinarily you want to make sure that the script is running on that version or a later version. You do not want to test for equality, since that may leave your code unable to run on later versions of the language engine.
VB.NET/VB 6 Differences
This property is new to VB.NET.
Get VB.NET Language in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.