Learn to Love Lambdas
summary
C# lambdas explained through a WPF demo that hooks a repository GetPeopleAsync event into an anonymous delegate then converts it to a lambda, showing parameter inference and the fat‑arrow syntax; closure/captured variable keeps list selection across async refreshes; LINQ method syntax uses Where, OrderBy/ThenBy/OrderByDescending and FirstOrDefault on an in‑memory IEnumerable<Person> to add name/date filters and stable sorting; all examples run live and the UI behaviors (selection preserved, filters combined, sorting secondary keys) work.
AI-written summary · about
chapters (4)
- 0:00Start
- 1:05LINQ (Language Integrated Query)
- 3:24Parameters: 3 Parts = goes to operator Expression or Statements
- 5:27SYNTACTIC VARIATIONS Optional Parameter Types (Parameter Type Inference) (s, e) = { ListBox.Items Source = e. Result; }








