2

I have a class with a load of methods and properties that will be used in multiple classes across the whole project. I don't want to have to instantiate an instance of this, that doesn't make any sense to me, but what is the best way to go about this?

I know in Java you could have a class marked with final and have a private constructor and static methods, as per this SO post. Is there a designated way of doing the same thing in vb.net that I'm missing?

Community
  • 1
  • 1
JabbaWook
  • 677
  • 1
  • 8
  • 25
  • 3
    Arvo's answer is correct but I'd strongly consider breaking those utilities out into their own classes or at the very least multiple modules of like utilities. – AJ X. Feb 10 '16 at 11:30

1 Answers1

4

In VB.NET, you can use Module instead of Class, internally it means something like public static/shared class.

Arvo
  • 10,349
  • 1
  • 31
  • 34