OverLoading (VB.NET)
Sub Main()
MySub("", 7)
Sum(1, 2)
Sum(1, 2, 3)
End Sub
Sub MySub(ByVal i As Integer, ByVal j As String)
Console.WriteLine("(Integer,String)")
End Sub
Sub MySub(ByVal i As String, ByVal j As Integer)
Console.WriteLine("(String,Integer)")
End Sub
Sub Sum(ByVal i As Integer, ByVal j As Integer)
Console.WriteLine(i + j)
End Sub
Sub Sum(ByVal i As Integer, ByVal j As Integer, ByVal k As Integer)
Console.WriteLine(i + j + k)
End Sub
如有錯誤 歡迎指正