O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ScriptEngine Property

Class

Microsoft.VisualBasic.Globals

Syntax

ScriptEngine

Return Value

A String containing the value “VB”

Description

Indicates the programming language currently in use

Rules at a Glance

ScriptEngine is a read-only property.

Programming Tips and Gotchas

  • A number of scripting engines support a ScriptEngine property or function, which allows you to determine the programming language used for a particular block of code. These languages, and the strings they return, are shown in the following table:

Language

String

Microsoft Jscript

JScript

VB.NET

VB

VBScript

VBScript

  • The ScriptEngine property can be most useful when calling legacy code. On the .NET platform, the need to know the current scripting engine is substantially lessened by the existence of a unified type system.

VB.NET/VB 6 Differences

The property is new to VB.NET and is not supported in VB 6.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required