Pass by Reference in C#

c#

Solution

Here's an example of passing an int by reference:

void DoubleInt(ref int x)
{
    x += x;
}

and you would call it like this:

DoubleInt(ref myInt);  

Here's an msdn article about passing parameters.

Problem

How to pass a parameter as a Reference in C# and when calling the function how should i represent it while defining that particular function

Original source

Related problems