Welcome back.
In this video, I want to quickly show you how you can get rid of this part here, and make sure that
we have full control over what is displayed on our console, because this is generated for us.
And you can see you can disable this under Tools Options Debugging automatically.
Okay.
So let's do just that.
Let's go over to Tools Options.
Then we go down to debugging.
And we can actually make it easier by entering automatically.
And then here we will find under Debugging General.
And then add the checkbox here under automatically close the console when debugging stops okay.
So let's run this again.
And we see whenever we execute our program it opens up the console real quick, executes this line of
code and then closes again.
So if we want to make sure that it does not close it again.
So I can enter console dot read line or read key either way.
So read key for example is where it's going to wait for one key to be pressed.
So you see here console dot read key with the brackets and then the semicolon which finishes this statement
as well.
So what this will do is it will wait for the user to press a key.
And until that happens the console stays open.
So you see here it says hello Dennis.
Now if I press any key it closes our application.
That's what this read key does.
It can be used for other purposes as well.
But in our current situation this is what we need in order to keep the console open.
All right.
That's it for this video.
In the next one we're going to look a little more at what we can see on the screen in Visual Studio
as we haven't covered that yet.