Method Overloads with different number of parameters : Overloaded functions « Class Module « VB.Net Tutorial






Public Class Tester
    Public Shared Sub Main

        Dim Alerter As New MyMessageBox
        
        Alerter.Alert("No Problems!")
        Alerter.Alert("No Problems!", MsgBoxStyle.Exclamation)

    End Sub

End Class


Public Class MyMessageBox
    Public Sub Alert(ByVal Text As String)
        MsgBox(Text)
    End Sub

    Public Sub Alert(ByVal Text As String, ByVal Icon As MsgBoxStyle)
        MsgBox(Text, Icon)
    End Sub
End Class








6.9.Overloaded functions
6.9.1.Overloads function
6.9.2.Using overloaded methods
6.9.3.Using overloaded methods to print arrays of different types
6.9.4.Method Overloads with different number of parameters
6.9.5.Inheritance and overloads