Search code examples
.netvb.netglobal-methods

Global methods?


This MSDN page mentions global methods in a module.

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

I wasn't aware there were global methods. The only thing I can think of is that this only applies to languages that allow global methods, i.e. C++, but that this doesn't not apply to C#.

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


Solution

  • Ok I should have continued reading the book ...

    For assemblies originally written in languages that support the notion of modules (for example, Visual Basic), the Module class also supports GetField, GetFields, GetMethod, and GetMethods methods. In those types of modules, fields and methods can be attached directly to a module.