C
C#2y ago
Danny

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
mtreit
mtreit2y ago
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
Danny
Danny2y ago
Awesome. Thanks, all!!