ref Locals and ref Returns
2 sectionsRapid overview
ref Locals and ref Returns
TL;DR
A ref local (ref int x = ref array[0];) is not a new variable holding a value: it is an alias, a managed pointer to existing storage such as an array element, a field or another variable. Reading or writing x reads or writes that storage di…
Read →How it works
Q: What is a ref local?
Read →