本文介绍了为什么要使用模块而不是类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我见过几个关于模块有用性的例子。为什么要使用模块 而不是类? 如果我将一个方法放入Module1,它是如何从其他类调用的? 谢谢, BrettI''ve seen few examples on the usefulness of a module. Why use a moduleinstead of a class?If I put a method into Module1, how is it called from other classes?Thanks,Brett推荐答案 模块模块1 Public Sub MySub() ''... End Sub 结束模块 然后从应用程序的任何地方: MySub - Larry Lard 回复团体请Module Module1Public Sub MySub()''...End SubEnd Modulethen from anywhere in the app:MySub--Larry LardReplies to group please 除了其他回复之外,您还可以在此处找到关于此 主题的讨论: < URL:http:// groups。 google.com/groups?q=dotnet.languages+vb+modules+class> - MS Herfried K. Wagner MVP< URL:http://dotnet.mvps.org/> VB< URL:http://classicvb.org/petition/>In addition to the other replies, you will find previous discussions on thistopic here:<URL:http://groups.google.com/groups?q=dotnet.languages+vb+modules+class>--M S Herfried K. WagnerM V P <URL:http://dotnet.mvps.org/>V B <URL:http://classicvb.org/petition/> 这篇关于为什么要使用模块而不是类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-15 17:22