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



Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
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


Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

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