O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

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

Methods Arguments: ByVal and ByRef

Methods can receive parameters and can then work with data provided by parameters. In the .NET terminology, parameters are also known as arguments. We mainly use the word arguments because it’s the one that you typically find within the documentation and about topics related to .NET development. The following code shows a simple sample of a method definition receiving an argument and subsequent invocation of that method passing an argument:

image

Arguments can be passed by value and by reference. You pass arguments by value adding the ByVal keyword, whereas you pass them by reference specifying the ByRef keyword. If ...

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