Saturday, December 29, 2007

ref vs out parameter

ref
Before passing ref parameter the sender class must instantiate the ref argument, so ref requires additional bandwidth to send the object both ways.
ref allows the called methods to modify the object to which the reference refers because the reference itself is being passed by reference.
out
An out argument is created by the called method and it is returned to the caller.

No comments:

Post a Comment