The C# ref keyword is used almost the same as the C++ & (reference) keyword.
The C# out keyword works similarly to ref. The difference is that the data will be forced to be emptied when entering the callee.
public void f1(out Data d1) { d1 = new Data(); // If you don't renew, you can't compile d1.m = 99 ; d1.n = 99; }