O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

More about Methods

In this section we look at several other topics pertaining to methods in VB.NET:

  • Parameter passing

  • Variable-length parameter lists

  • Method overloading

  • Optional parameters

Parameter Passing

Programming languages have different mechanisms for passing parameters. One mechanism is known as call-by-value. This means that the actual data values are copied and passed to the method being called. These copied values are pushed onto the stack, and the called function obtains independent copies of the values. Any changes made to these values will not be propagated back to the calling program. VB.NET supports this mechanism of parameter passing using the ByVal keyword, but VB.NET also supports call-by-reference parameters.

Some terminology ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required