Global methods?

This MSDN page mentions global methods in a module.

Module.GetMethods "returns the global methods defined in the module."

I did not know that global methods exist. The only thing I can think of is that this only applies to languages ​​that allow global methods, i.e. C ++, but this does not apply to C #.

What are these "global methods" that this MSDN page talks about?

+4
source share
2 answers

Ok, I had to keep reading the book ...

For assemblies originally written in languages ​​that support the concept of modules (such as Visual Basic), the Module class also supports GetField , GetFields , GetMethod and GetMethods . In these types of modules, fields and methods can be attached directly to the module.

+2
source

This is the comment I posted earlier:

I'm not sure, but I think that the MSDN link that you provided refers to Modules created in VB.Net, and global methods are created in these modules

As mentioned in the comments, here's how you can create modules in VB.Net and create global functions in these modules ...

http://www.homeandlearn.co.uk/net/nets9p7.html

OR

http://www.mka-soft.com/vbnet-tutorial/25-vbnet-tutorial-16-module

+3
source

All Articles