Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Modules in VB.NET

Posted on 2003-12-08
3
Medium Priority
?
537 Views
Last Modified: 2007-12-19
Hi,

Just wondering if someone could explain to me the usage of Modules in VB.NET, and why one would chose to use this method.  

According to a book's definition, programmers use modules to group related rpcedures so that they can be reused in other projects.  Modules are similar in many ways to classes; they allow programmers to build reusable components without a full knowledge of object-oriented programming.  

So if this was the case, why not just use regular classes in VB.NET, and inherit the base class?  Or is this a feature that was carried over from the VB6 days of coding?  

Thanks,
scottiesi
0
Comment
Question by:scottiesi
3 Comments
 
LVL 1

Expert Comment

by:Crazy_king_in
ID: 9902872
It is a feature from VB6 and further more a class can be declared in a module.
This module is for re-usability and not just for inheritance.
0
 
LVL 10

Accepted Solution

by:
GoodJun earned 150 total points
ID: 9904113
a module is a class (a special class). You don't have to use it, it only provides some convenience for the vb6 programmers that used to it. The procedures in the module is in a global class that you don't need to instantiate by yourself. The CLR will know to search this global object (after it is instantiated automatically) to find the procedures when you use it.
0
 
LVL 8

Expert Comment

by:Dranizz
ID: 9906371
In VB.NET the module is equivalent as making a Static Class with Shared Methods
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question