Backend line

ref Locals and Returns

Aliases to storage, ref returns, ref readonly, managed pointers, in-place updates

1 sections

Start: ref Locals and ref Returns

Senior 1

  1. ref Locals and ref ReturnsA 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…, not read