From the course: C# Essential Training 2: Generics, Collections, and LINQ
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Task management - C# Tutorial
From the course: C# Essential Training 2: Generics, Collections, and LINQ
Task management
- [Instructor] As we've looked at these two models where we specifically create a thread and start and join and then also, when we come down here and used the async and await keywords, you may have asked yourself, how can I get something in between? I like this async await. It's very simple, gives me a very simple model without all those callbacks and I don't have to manage the thread, but I would like to queue up multiple pieces of work. Let's look at how we can use tasks to do that kind of work. We'll take our do file work async here. I'm just going to create a parameter, we'll call it employee name, and then instead of my name, we're just going to use that employee name here. I'll put the dollar sign here to get us the string interpolation. So now we can actually parameterize this and we can say, I want to do this work on a particular file. We'll copy and then paste our file here. Rename that. We'll call it Felicia.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.