VB.net Module returning data like a function
How could I call a module or something else to return data to me after its ran. I don't want to make my form1 code all messy.
Thanks!
Example by what I mean return:
Public Function Test() As String
Return "Tes34t"
End F开发者_开发知识库unction
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MessageBox.Show(Test)
End Sub
If Test
is in the same class (Form1), then just use
MessageBox.Show(Test())
If it's in module "MyModule", then use
MessageBox.Show(MyModule.Test())
精彩评论