What is the use of "out" in variable fields? Example:

I’m looking through some example code, and I came across this:

public static bool GetTouchDeltaPos (int id, out Vector2 deltaPos)

And I’m not quite sure what the “out” before Vector2 is.

It is used elsewhere in the script in other contexts separate from Vector2, and it shows up as a different color identifier in MonoDevelop, so I assume it has some special significance to the compiler.

Thank you for the help

the out keyword is similar to a pass by ref, where the method/function that is called is able to modify it. Methods/functions can only return one value, so if you want to pass multiple values out from a method/function, you can use the out keyword to pass them all out. Out allows for the initial value to be assigned within the calling method/function whereas a ref would need to have the value originally initialized on the outside. Does that make sense?