Here is what I understand so far:
PASS BY VALUE
Passing by value means a copy of an argument is passed. Changes to that copy do not change the original.
PASS BY REFERENCE
Passing by reference means a reference to the original is passed. changes to the reference affect the original.
REF Keyword
REF tells the compiler that the object is initialized before entering the function. REF means the value is already set, the method can therefore read it and modify it. REF is two ways, both in and out.
OUT Keyword
OUT tells the compiler that the object will be intialized inside the function. OUT means the value is not already set, and therefore must be set before calling return. OUT is only one way, which is out.
Question
So in what scenarios would you combine the use of the ref and out keywords, with passing by reference or passing by value? Examples would help tremendously.
Help greatly appreciated.