0
The effect of passing by reference is that any change to the parameter in the called method is reflected in the calling method.
class RefExample {
static void Method(ref int i) {
i = i + 44;
}
static void Main() {
int val = 1;
Method(ref val);
Console.WriteLine(val); // Output: 45
}
}