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

type pattern

A pattern that tests a value's type, like is string s.

A type or declaration pattern matches when the value is of the given type, optionally binding it to a new variable.

Examples

  • if (item is Book book) Console.WriteLine(book.Author); tests the type and names the result in one step.

Read the full section →