Download presentation
Presentation is loading. Please wait.
Published byAshley Johnston Modified over 9 years ago
1
DEV415
5
You are in a dark room with no signs of life. You still have your torch and $356. You can go North (N) or South (S). Your choice? _
19
async void ServeCustomer(Customer customer) { var order = TakeOrder(customer); try { var pizza = await GetSomeoneToMakeThePizza(order); GivePizzaToCustomer(customer, pizza); using (var employee = GetNewEmployee()) { await WaitForCustomerToFinishEating(); employee.CleanUpCustomerRubbish(); } catch (PizzaMakingException ex) { }
34
Head to... aka.ms/te
37
void CallYield() { int callIndex = 0; Console.WriteLine(“ Call - 1"); foreach (var number in GetNumbers()) { Console.WriteLine(" Call: " + callIndex++); } IEnumerable GetNumbers() { Console.WriteLine("Before 1"); yield return 1; Console.WriteLine("Before 2"); yield return 2; Console.WriteLine("Yield finished"); } Call - 1 Before 1 Call: 0 Before 2 Call: 1 Yield finished Call: 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.