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

var

A keyword that lets the compiler work out a variable's type from its starting value.

var declares an implicitly typed local; the variable is still statically typed, with the type inferred from its initializer.

Examples

  • var count = 3; makes count an int, exactly as if you'd written int count = 3;.

Read the full section →