Hi,
In C#, parameters can be passed either by value or by reference.
Passing parameters by reference allows function members (methods,
properties, indexers, operators, and constructors) to change the value
of the parameters and have that change persist. To pass a parameter by
reference, use the ref or out keyword. For simplicity, only the ref keyword is used in the examples of this topic. For information on the difference between ref and out, see http://msdn.microsoft.com/en-us/library/14akc2c7%28VS.71%29.aspx, http://msdn.microsoft.com/en-us/library/t3c3bfhx%28VS.71%29.aspx, and http://msdn.microsoft.com/en-us/library/szasx730%28VS.71%29.aspx.
This topic includes the following sections:
- http://msdn.microsoft.com/en-us/library/0f66670z%28VS.71%29.aspx#vclrfpassingmethodparameters_valuetypes
- http://msdn.microsoft.com/en-us/library/0f66670z%28VS.71%29.aspx#vclrfpassingmethodparameters_referencetypes
For more detail check this link:
http://msdn.microsoft.com/en-us/library/0f66670z(VS.71).aspx