From the course: Debugging in C#

Unlock the full course today

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

Beginner debugging code challenge

Beginner debugging code challenge

From the course: Debugging in C#

Start my 1-month free trial

Beginner debugging code challenge

(upbeat electronic music) - [Instructor] It's time to practice your debugging skills with this code challenge. Be sure to use all the tools you've learned so far, including breakpoints, the call stack, debug mode, and more. For this challenge, you will be debugging some code that finds the minimum value in a given array. In this program, we create a variable called numbers and feed it into the findMin function. FindMin contains all of the logic for getting the item with the least value from the array. At the end, we print the returning value. Jumping into Visual Studio Code, we can look at the program we are going to debug. First, we have the main method where we initialize the number's array. Then we create a variable called Min that's an integer and store the value that findMin returns given the argument numbers. The logic for findMin is up here. Next, we print out Min to the console so that variable that has the value findMin returns. Be sure to check out the exercise files to get…

Contents