' Visual Basic 2008 9.0 .NET Examples - Methods and Arguments - Procedures and Functions : Module Example3 Sub Main() Console.WriteLine(GetPower(3, 3)) Console.WriteLine(GetPower(3)) ' (1) ' Console.ReadLine() End Sub Function GetPower(ByVal base As Integer, _ Optional ByVal exponent As Integer = 2) As Integer GetPower = base ^ exponent End Function End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.