From the course: Visual Studio: Advanced Debugging Tools

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Examine the sample application code

Examine the sample application code - Visual Studio Tutorial

From the course: Visual Studio: Advanced Debugging Tools

Start my 1-month free trial

Examine the sample application code

- [Instructor] We should start by looking at the code in the Robot class. It's fairly simple. There's a number of properties like name, battery level, laser color, that's what the color of the output I put in the console, how long it takes for the robot to scan for a gemstone, how many gemstones they're supposed to find. And then, the actual work that's run on the various threads is in this method here called FindGemstones, and it's a simple method. It's got a counter for the number of gemstones to find, it checks the battery level, and if it drops below 10% then the robot returns to recharge. And then, it outputs a bunch of console information. And then, here's the simulated work, we're going to sleep the thread based on the scan delay, then we calculate a new battery level, and that's pretty much it. I'll put some more console. So, the main work is running through this for loop and delaying the thread. The…

Contents