开发者

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开发者_如何学Python. 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?


This is the comment I placed earlier:

I am not sure, but I think the MSDN link you've given is referring to the Modules that are created under VB.Net and global methods are created under those modules

As mentioned in comments, here is the way, how you would create modules in VB.Net and create global functions under those modules...

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

OR

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜