(question from a customer)
If you use 'ref' or 'out' on a method parameter:
class Test
{
public void Process(ref int t)
{
...
}
}
when you call it you need to specify 'ref':
Test t = new Test();
int val = 5;
t.Process(ref val);
We require you to include 'ref' or 'out' to improve the readability of your code. Anybody who looks at the call above can tell that the value of val might be changed during the call. Otherwise, you'd have to find the definition, which would be much more difficult.
Read: Why does C# require 'ref' and 'out' at both definition and use?