Skip to Main Content
VBScript in a Nutshell, 2nd Edition
book

VBScript in a Nutshell, 2nd Edition

by Paul Lomax, Matt Childs, Ron Petrusha
March 2003
Intermediate to advanced content levelIntermediate to advanced
512 pages
14h 30m
English
O'Reilly Media, Inc.
Content preview from VBScript in a Nutshell, 2nd Edition

Name

Class Statement

Syntax

Class name
  'statements
End Class
name

Use: Required

Data Type: n/a

The name of the class

Description

Defines a class and delimits the statements that define that class’s member variables, properties, and methods.

Rules at a Glance

  • name follows standard Visual Basic variable naming conventions.

  • statements can consist of the following:

    • Private variable definitions. These variables are accessible within the class but not outside it.

    • Public variable definitions. (If variables are declared using the Dim keyword without an explicit indication of their accessibility, they are Public by default.) These variables become public properties of the class.

    • Public functions and subroutines defined with the Function...End Function or Sub...End Sub statements. The scope of routines not explicitly defined by the Public or Private keywords is public by default. These routines become the public methods of the class.

    • Private function and subroutines defined with the Function...End Function or Sub...End Sub statements. They are visible within the Class...End Class code block, but not to code outside the class.

    • Public properties defined using the Property Let, Property Get, and Property Set statements. Properties defined without an explicit Public or Private statement are also Public by default. They, along with any public variables, form the public properties of the class.

    • Private properties defined using the Property Let, Property Get, and Property Set statements. They are visible within ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

VBScript in a Nutshell

VBScript in a Nutshell

Matt Childs, Paul Lomax, Ron Petrusha
Microsoft® PowerShell, VBScript and JScript® Bible

Microsoft® PowerShell, VBScript and JScript® Bible

William R. Stanek, James O'Neill, Jeffrey Rosen

Publisher Resources

ISBN: 0596004885Errata Page