module vs class

  • Thread starter Thread starter Raymond Lewallen
  • Start date Start date
R

Raymond Lewallen

Whats the difference in using a module with all public functions versus
using a class with all shared functions and a private constructor?

Raymond Lewallen
Federal Aviation Administration
 
Raymond,
Whats the difference in using a module with all public functions versus
using a class with all shared functions and a private constructor?

In practice it's hardly any difference.

With a private constructor the class can still be instantiated from
within the class itself. A module can never be instantiated since it
doesn't have any instance constructor, not even a private one.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

source control software 3
MSFT took all the good namespaces 2
All methods are virtual? 20
Short-circuiting 6
Reading MSIL 10
Decentralized unit initialization 11
Dynamic Class Instantiate 0
New MSIL Newsgroup 5

Back
Top