December 13, 2013 Hot Topics: RSS RSS feed Download our iPhone
app  New JScript .NET Data Types , Page 3    • January 7, 2002
• By Essam Ahmed, Essam Ahmed   • Send Email »   • More Articles
»  Creating a custom data type using JScript .NET  JScript .NET
addresses the above issues by allowing you to create your own
data types using the class keyword. Consider the following code:
class Person   public var firstName : String;   public var
lastName : String;   private var emailAddress : String;   //
rest of class follows later in this article...  The listing
defines a new person class with three member variables, just as
the HTML page did in the previous example. The differences here
are that each of the variables is bound to a specific type
(String), and two of the three variables are public while one is
private. public variables are just like regular variables - you
can directly access and modify them. A private variable, in
contrast, is not accessible to any code that resides outside of
the class that defi