ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

ASP.NET version of "ByRef vs. ByVal"

This main purpose of this sample is to illustrate one of the side effects that can occur when you pass arguments to a function or subroutine.

There are two ways that you can specify for VB to pass arguments to a procedure: by reference (ByRef) or by value (ByVal). If you haven't already, please see the Classic ASP version for an explanation of the difference.

You may notice from the results of the sample above, that the default method of passing parameters has changed. In VBScript/VB6, if you didn't specify which method to use, then parameters were passed was ByRef. Starting with the .NET Framework 1.x release, the default was changed. Now if you don't specify how parameters should be passed, they are passed ByVal.

Here's a zip file of the code (1 KB).

Play with the running version.

View the live source code.

Back to the "ByRef vs. ByVal" sample


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers