Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

ref parameter

A parameter that is an alias for the caller's variable.

ref passes a variable by reference so the method can read and replace it; out requires the method to assign it; in passes a read-only reference.

Loading interactive…

Examples

  • static void AddTip(ref decimal bill) => bill *= 1.15m; changes the caller's own variable when called as AddTip(ref bill);.

Read the full section →