1 00:00:00,120 --> 00:00:02,560 Hello and welcome to this video. 2 00:00:02,610 --> 00:00:12,450 In this video I'll be showing you how to create a very basic console application using C sharp and Visual 3 00:00:12,450 --> 00:00:13,140 Studio. 4 00:00:13,140 --> 00:00:23,670 Let's begin by opening up features to do so I go to my start menu and then locate where Visual Studio 5 00:00:23,670 --> 00:00:26,730 is so visual studio is here. 6 00:00:26,790 --> 00:00:36,420 Just going to click to open up for just to do 2019 the first thing I want to do is create a C sharp 7 00:00:36,570 --> 00:00:38,590 application project. 8 00:00:39,000 --> 00:00:47,670 The project type comes with all the template files that I'm going to need from the visual to star top 9 00:00:47,910 --> 00:01:00,450 window click on the create a new project link on the create a new project window enter or type console 10 00:01:00,840 --> 00:01:02,550 in the search box. 11 00:01:02,610 --> 00:01:10,920 Once you've typed in the console in the search box in this box that says all languages click on the 12 00:01:10,920 --> 00:01:11,930 dropdown. 13 00:01:12,060 --> 00:01:21,860 Select C Sharp from the all platform list click on the dropdown and select windows next. 14 00:01:22,110 --> 00:01:27,990 Select this option for console up the net. 15 00:01:28,080 --> 00:01:35,940 Make sure that is highlighted and click next in the config for your new project window. 16 00:01:35,970 --> 00:01:44,310 Change the default name from console up 1 to Hello world. 17 00:01:44,310 --> 00:01:55,020 Once you've changed the name of your project to Hello world it also gives the same name for the solution. 18 00:01:55,020 --> 00:01:59,540 The project is going to be stored in this location. 19 00:01:59,730 --> 00:02:06,420 If you want to change the location you can do that by clicking on this browse option and then selecting 20 00:02:06,510 --> 00:02:08,430 a new location. 21 00:02:08,430 --> 00:02:12,660 So once you enter the name Just click on this create button. 22 00:02:12,660 --> 00:02:24,290 Visual Studio opens up your new project and it also includes the default hello world code in your project. 23 00:02:24,390 --> 00:02:32,010 The code on line number 9 basically means write the text hello world in the console. 24 00:02:32,040 --> 00:02:40,250 I'm going to add on another line of code to work with the code on line number 9. 25 00:02:40,260 --> 00:02:49,240 That or read that text that has been written and we're going to use the read line method to do that. 26 00:02:49,800 --> 00:02:52,440 I have added a line of code. 27 00:02:52,440 --> 00:02:54,620 Line number 10 console. 28 00:02:54,730 --> 00:02:55,870 Or red line. 29 00:02:55,890 --> 00:02:57,820 So what the red line method would do. 30 00:02:57,840 --> 00:03:05,250 It would read the text that was written in between the parentheses on line number 9. 31 00:03:05,250 --> 00:03:08,410 It will read that on the console. 32 00:03:08,430 --> 00:03:16,530 Notice the yellow strip on the side that indicates that I've made changes to the code but I have not 33 00:03:16,620 --> 00:03:20,670 saved the changes to save the changes to my code. 34 00:03:20,730 --> 00:03:27,990 Just going to click on this save or once I do that you can see the strip has turned green which means 35 00:03:28,290 --> 00:03:33,350 the code has been saved to run the application. 36 00:03:33,360 --> 00:03:43,650 You can either click on this play button with the name ELO world or you can press F 5 on your keyboard. 37 00:03:43,730 --> 00:03:48,840 So I'm going to click on this play button here to run the application. 38 00:03:48,840 --> 00:03:56,360 You can see on the bottom here it says build has started so give it a few minutes to build the application. 39 00:03:56,400 --> 00:04:05,690 The application is now running in the console as you can see he just has the text hello world. 40 00:04:06,000 --> 00:04:07,390 To close. 41 00:04:07,440 --> 00:04:16,020 The application from the console window just press enter and then press any key to close the window 42 00:04:16,650 --> 00:04:27,720 to close the output window just click on the X and to exit Visual Studio just go file and click. 43 00:04:27,760 --> 00:04:28,330 Exit.