A parameter declared with a ref
modifier is a reference parameter.
A reference parameter does not create a new storage location. Instead, a reference parameter represents the same storage location as the variable given as the argument in the function member invocation. Thus, the value of a reference parameter is always the same as the underlying variable.
The following definite assignment rules apply to reference parameters. Note the different rules for output parameters described in §5.1.6.
Within an instance method or instance accessor of a struct type, the this
keyword behaves exactly as a reference parameter of the struct type (§7.5.7).