Hello and welcome to this video.
In this video I'll be showing you how to create a very basic console application using C sharp and Visual
Studio.
Let's begin by opening up features to do so I go to my start menu and then locate where Visual Studio
is so visual studio is here.
Just going to click to open up for just to do 2019 the first thing I want to do is create a C sharp
application project.
The project type comes with all the template files that I'm going to need from the visual to star top
window click on the create a new project link on the create a new project window enter or type console
in the search box.
Once you've typed in the console in the search box in this box that says all languages click on the
dropdown.
Select C Sharp from the all platform list click on the dropdown and select windows next.
Select this option for console up the net.
Make sure that is highlighted and click next in the config for your new project window.
Change the default name from console up 1 to Hello world.
Once you've changed the name of your project to Hello world it also gives the same name for the solution.
The project is going to be stored in this location.
If you want to change the location you can do that by clicking on this browse option and then selecting
a new location.
So once you enter the name Just click on this create button.
Visual Studio opens up your new project and it also includes the default hello world code in your project.
The code on line number 9 basically means write the text hello world in the console.
I'm going to add on another line of code to work with the code on line number 9.
That or read that text that has been written and we're going to use the read line method to do that.
I have added a line of code.
Line number 10 console.
Or red line.
So what the red line method would do.
It would read the text that was written in between the parentheses on line number 9.
It will read that on the console.
Notice the yellow strip on the side that indicates that I've made changes to the code but I have not
saved the changes to save the changes to my code.
Just going to click on this save or once I do that you can see the strip has turned green which means
the code has been saved to run the application.
You can either click on this play button with the name ELO world or you can press F 5 on your keyboard.
So I'm going to click on this play button here to run the application.
You can see on the bottom here it says build has started so give it a few minutes to build the application.
The application is now running in the console as you can see he just has the text hello world.
To close.
The application from the console window just press enter and then press any key to close the window
to close the output window just click on the X and to exit Visual Studio just go file and click.
Exit.