Skip to content

Glossary: C# Beyond the Basics

TryGetValue

Also written: out parameter

A dictionary method that looks up a key and returns true if found, filling an `out` variable with the value. `Inventory.Sell` uses it to check a SKU exists before changing anything.

Where the book teaches it

Related terms

KeyNotFoundExceptionnull-state analysis