What rule applies to an out parameter in C#?
Correct answer B. The method must assign it before returning; the caller need not initialise it
Explanation
out passes an argument by reference for output. The called method must definitely assign every out parameter before it returns normally, while the caller may pass an unassigned variable. This is how int.TryParse("42", out int n) returns both a bool and the parsed value. The read-only by-reference modifier is in, and ref requires initialisation by the caller.
Answer checked How we write and check questions
Discussion