From the course: Advanced C#: Thread-Safe Data with Concurrent Collections

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Review the updated example application

Review the updated example application

- [Instructor] This is the chapter where we look at how to modify the contents of the concurrent dictionary. In this video, I'll look on how I've modified the example code to make it simpler to understand some of the concepts. In prior videos, I had a concurrent dictionary, that had an integer as the key and an instance of the robot structure as the value. This shows that we can work with complex types in the dictionary. But that obscures some of the demonstrations I want to show later. So, what I've done is simplified it by making a concurrent dictionary that has a string of the key and an integer value as the value. As you can see, the string is going to be the robot name and the value is going to be some number and the way I'm thinking about this is since these are game robots and they go out and they search for gems, I'll call this the gemstone count. So robot one has 10 gemstones, robot two has 20 and…

Contents