C sharp global functions
Hi all. In VB.NET, I can create a module, and every public method in that module is accessible everywhere in the project (without any kind of “prefix” like the module name). How can I do the same thing in a C# project?
2 Replies
C# doesn't have global functions.
You can make static methods on a class and access those via the type they are defined on.
That's true. I'm not a big fan of that feature but it is certainly available. It's just syntactic sugar to make the code less verbose...
Which is fine if you want that
Awesome. Thanks, all!!