Is it considered an acceptable practice to use Modules instead of Classes with Shared member functions in VB.NET?
I tend to avoid Modules, because they feel like leftover remains from Visual Basic 6.0 and don't really seem to fit in anymore. On the other hand, there doesn't seem to be much difference between using a Module and a Class with only Shared members. It's not that often that I really have much need for either, but sometimes there are situations where they present a simple solution.
I'm curious to hear whether you have any opinion or preferences one way or the other.
Private
qualifier. In a class, the default protection level is private, which can be confusing behaviour unless you are aware about it. – SulfonationIntellisense
can pickup on so many other Methods and such without instantiating the classes explicitly as I'm developing several classes that I though should be global, and having more experience with VBA'sGlobal
attribute, I'm ecstatic to find out thatModules
are indeed exactly what I am looking for. – Mccreery