Overloading Methods

One of the most powerful features in the object-oriented development with the .NET Framework is the capability of overloading methods. Overloading means providing multiple signatures of the same method, in which signature is the number and types of arguments a method can receive. The following code snippet demonstrates overloading:

Private Function ReturnFullName(ByVal firstName As String,           ByVal lastName As String) As String    Return firstName & " " & lastNameEnd FunctionPrivate Function ReturnFullName(ByVal firstName As String,        ByVal lastName As String,        ByVal Age As Integer) As String    Return firstName & " " & lastName & " of age " & Age.ToStringEnd FunctionPrivate ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.