' Visual Basic 2008 9.0 .NET Examples - Method Overloading - Procedures and Functions : Module Example2 Sub Main() Console.WriteLine(GetSum(1, 2)) Console.WriteLine(GetSum(1, 2, 3)) Console.WriteLine(GetSum(1, 2, 3, 4)) ' Console.ReadLine() End Sub Function GetSum(ByVal value1 As Integer, _ ByVal value2 As Integer) As Integer GetSum = value1 + value2 End Function Function GetSum(ByVal value1 As Integer, _ ByVal value2 As Integer, _ ByVal value3 As Integer) As Integer GetSum = value1 + value2 + value3 End Function Function GetSum(ByVal value1 As Integer, _ ByVal value2 As Integer, _ ByVal value3 As Integer, _ ByVal value4 As Integer) As Integer GetSum = value1 + value2 + value3 + value4 End Function End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.