PreviousNext
by bill-s, 2017-07-21T03:16:15.000Z
Before C# 7.0, the ref was only used to be passed as a parameter in the method. It enhanced with return it and uses it later in C# 7 using ref return and ref local.
Ref: It uses to pass an argument to a method by reference. It uses in a method call and signature.
Ref Return: It uses to return a value to the caller by reference. It uses in a method body and signature.
Ref Local: It uses to store a value locally as a reference that caller intends to modify.
Read More