Mega Code Archive

 
Categories / C# Tutorial / Class
 

How Arguments Are Passed

Call-by-value: Copy the value of an argument into the formal parameter. Change made to the parameter have no effect on the argument used in the call . Call-by-reference. A reference to an argument is passed to the parameter. Change made to the parameter will affect the argument used to call the subroutine. When you pass a value type, such as int or double, to a method, it is passed by value. An object is passed by reference