0 out of 1 rated this helpful - Rate this topic

Introduction to JScript .NET for JScript Programmers

The information presented here is mainly for programmers who are already familiar with JScript and want to learn about the new features introduced in JScript .NET.

How to compile programs
The JScript .NET command-line compiler creates executables and assemblies from JScript programs. For more information, see Compiling JScript code from the Command Line.
How to write a "Hello World" program
It is easy to write the JScript .NET version of "Hello World". For more information, see The JScript Version of Hello World!.
How to use data types
In JScript .NET, a colon specifies the type in a variable declaration or function definition. The default type is Object, which can hold any of the other types. For more information, see JScript Variables and Constants and JScript Functions.

JScript .NET has several built-in data types (such as int, long, double, String, Object, and Number). For more information, see JScript Data Types. You can also use any .NET Framework data type after importing the appropriate namespace. For more information, see .NET Framework Class Library.

How to access a namespace
A namespace is accessed using either the import statement (when using the command-line compiler) or the @import directive (when using ASP.NET). For more information, see import Statement. The /autoref option (which is on by default) automatically attempts to reference the assemblies that correspond to namespaces used in a JScript .NET program. For more information, see /autoref.
How to create typed (native) arrays
A typed array data type is declared by placing square brackets ([]) after the data type name. You can still use JScript array objects, objects created with the Array constructor. For more information, see Arrays Overview.
How to create a class
In JScript .NET, you can define your own classes. Classes can include methods, fields, properties, static initializers, and sub-classes. You can write a completely new class, or you can inherit from an existing class or interface. Modifiers control the visibility of the class members, how members are inherited, and the overall behavior of a class. Custom attributes can also be used. For more information, see Class-based Objects and JScript Modifiers.

See Also

Getting Started With JScript .NET | Upgrading Applications Created in Previous Versions of JScript

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.