Call Shared Function in VB.net
To Create Helper Class file in your project.
To Create Helper Class file in your project.
Private Shared str As String
Public Shared Function Subtract(ByVal x As Integer, ByVal y As Integer) As String
str = "The Result:" & x - y
Return str
End Function
Call Shared Function Public Shared Function Subtract(ByVal x As Integer, ByVal y As Integer) As String
str = "The Result:" & x - y
Return str
End Function
MessageBox.Show(CHelper.Subtract(15, 10))
Note: you can't Shared Function in the Module