Difference between ref and out keywords in C# Niraj Kumar Mishra106328-Aug-2017c#c# Updated on 19-Sep-2020
Niraj Kumar Mishra
28-Aug-2017ref and out both allow the called method to modify a parameter. The difference between them is what happens before you make the call.
ref means that the parameter has a value on it before going into the function.
out means that the parameter has no official value before going into the function.