C# 7: Ref Returns, Ref Locals, and how to use them

added by DotNetKicks
3/24/2017 1:15:27 PM

3 Kicks, 216 Views

C# has always supported the ability to pass by reference using the ref keyword on method parameters. C# 7 adds the ability to return by reference and to store references in local variables. The primary reason for using ref returns and ref locals is performance.