Yes, you basically understand that. inexpands to const scope, which means that you cannot change the variable (or whatever it indicates), and also should not contain a link to it anywhere ( scopeactually not implemented in most cases). Basically, init looks do not touch.
outmeans that this variable takes a value. It is very similar to ref- the changes inside the function are also visible from the outside - with the slight difference that the out variables are initialized to their normal init value, clearing the value that they had before the function was called.
Basically, void foo(out int a) {}==void foo(ref int a) { a = 0; /* inserted automatically */ }
source
share