Search This Blog

Wednesday, March 5, 2014

Call Statement VB.NET Example

VB.NET > Statements > Call


Call transfers control to a function or dynamic-link library.
Call keyword is used when the called expression doesn't start with an identifier.


Example:


Class mClass
    Public Sub Method()
        MessageBox.Show("Call statement")
    End Sub
End Class

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Call New mClass().Method()
    End Sub

End Class