Oop Concepts
Class
-
Class is template for an object
-
Class is a collection of methods and attributes
- An object is an instance of a Class
- You can use modules to write common functions.
- A Module is a group of functions. Unlike functions in classes, Public functions in modules can be called directly from anywhere else.
- VB provides Functions and Subroutines. Functions and Subroutines are almost the same, but the difference is that a subroutine can’t return a value.
- A constructor is a method which is invoked when an object of a class is created.
you should use useNew() to create constructors.
- Constructors can be overloaded but unlike the functions, the Overloads keyword is not required
Destuctor
- A Destructor is a special function which is called automatically when a class is destroyed
Object
Modules
Constructor