Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Modules in VB.NET

Posted on 2003-12-08
3
Medium Priority
?
535 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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