LANGUAGE

ref parameter

Allows reading and writing initialized caller storage.

Formal Syntax & Structure

csharp syntaxcsharp
void Name(ref int n)

Working Example

Example Snippetcsharp
static void Increment(ref int n) { n++; }
C# & .NET Reference