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 shows an example of overloading:

image

As you can see, there are four different implementations of one method named ReturnFullName. Each implementation differs from the others in that it receives a different number of arguments. The preceding example is simple, and the arguments are self-explanatory; each implementation returns ...

Get Visual Basic® 2010 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.