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

Try pattern

A method that returns true or false for success and hands the result back through out.

The Try pattern (bool TryX(..., out T result)) reports an expected failure through its return value instead of throwing, as int.TryParse does.

Examples

  • bool TryGetDiscount(string code, out decimal percent) returns false for an unknown code instead of throwing.

Read the full section →