From the course: Source Code Control in .NET with Git Using SourceTree

Unlock the full course today

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

Restoring from the stash

Restoring from the stash

From the course: Source Code Control in .NET with Git Using SourceTree

Start my 1-month free trial

Restoring from the stash

- [Instructor] You will remember that we were charged with creating a division method So let's go ahead and create an integer division method. And we'll say public int because you'll remember integer division returns an integer. And we'll call it division int left int right. We do need to be a little careful that right is not a zero because then we would get a divide by zero exeption so we'll say if right equals zero return zero. Okay, now we can come down and say return left divided by right. And that should give us a value in integer division. Let's go over to runner.cs and here we're going to, again, have a console right line let's copy and paste. And say that the quotient of and let's give it two different numbers this time so that we get a reasonable division. Of 20 and four is, and we want to say calculator.divisioN and we'll make this 20 and we'll make this four. Alright, I believe that's all set, let's go ahead and run this and we see the quotient of 20 and four is five. Which…

Contents