8.26.2012

Difference between Class and Module

Difference between Class and Module
S.No Class Module
1
Meaning:
A class is a plan which is used to construct objects (instances of the class).
Meaning:
A module is a loose grouping construct used to group functions and
procedures.
2
Instance Creation:
Instances can be created from a class in the form of objects
Instance Creation:
Instances cannot be created from a module in the form of objects
3
Scope of Class Members:
The scope of the members of a class is only for the lifetime of the object
Scope of Module Members:
The scope of the members of a module exist for the life of the program.
4
Effect on Compilation:
Class is compiled into a dll
Effect on Compilation:
Module is compiled into an exe.
5
Starting Point of Project:
Class explicitly need to mention a starting point of the Project from within.
Starting Point of Project:
Module implicitly can be the main starting point in a project through the Sub main() method.

No comments:

Post a Comment