A module is a class, it's just a sealed (ie, you can't inherit from it) and
it has shared/static members. You can create a class that gives you the
same functionality (in C# modules as such don't exist) so the distinction
isn't really there. If you have a class with all shared members, you never
instantiate it so everything is shared or static. Very handy for some apps,
not quite so useful in others.
If you want to see what's really happening, create a class that's sealed and
mark everything static. Then create a module with the same names. Compile
and look at them through ILDASM...the similarities are remarkable.
HTH,
Bill
"Ray" <an*******@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
Greeting,
I'm still grasping the class concept so bear with me.
I have a vb.net app in which I wrote and placed various public functions
for later reference.
In vb.net there is an option to "add class" or "add module". My
understanding is a module is a class so what is the difference?
Correct me if I'm wrong....a module allows you to call various
functions/procedures without first defining and class you do?