LANGUAGE

out parameter

Requires assignment before normal return; caller need not initialize the variable.

Formal Syntax & Structure

csharp syntaxcsharp
void Name(out int n)

Working Example

Example Snippetcsharp
static void Set(out int n) { n = 8; }
C# & .NET Reference