如何引用Module中的函数
我在vb.net中新建了一个Module,然后在其中新建了一个函数,如何在其他地方(列如Form的Button中)引用这个Module中定义的函数?Module代码如下:
Public Module MyModule
Public Function ab()
Dim a As Integer = 1
Dim b As Integer = 2
Return a + b
End Function
End Module
[解决办法]
dim i as integer
i=ab()
就可以
不过你的函数没写全
public function ab() as integer
end function