1
00:00:01,020 --> 00:00:07,140
In this video we're going to be touring visuals to do would be creating a simple console application

2
00:00:07,140 --> 00:00:12,630
for C sharp and we'll be looking at the interface and just getting familiar with all of the buttons

3
00:00:12,630 --> 00:00:19,810
and what all of them do know my visual studio is using what we call dark mode which makes it black.

4
00:00:19,890 --> 00:00:25,380
So your own is probably silver or white in the interface and I will show you how to change that but

5
00:00:25,380 --> 00:00:31,350
for know this screen launches whenever you click Visual Studio and to the left you see a list of all

6
00:00:31,350 --> 00:00:32,860
of your recent projects.

7
00:00:33,050 --> 00:00:39,030
I've had a number of projects working on I kind of collapse them so as not to put too much on the screen

8
00:00:39,030 --> 00:00:45,240
for display at this point but your own will probably be empty but you will have the option so the right

9
00:00:45,270 --> 00:00:51,930
asking you to clone our check code open up project folder or create a new project something to click

10
00:00:51,990 --> 00:00:59,310
Create a new project this launches the different categories of projects that are available to you.

11
00:00:59,330 --> 00:01:05,620
So based on the package that you would have installed you may see more or fewer than I have on my screen.

12
00:01:05,630 --> 00:01:12,560
I have quite a few packages installed on my visual studio instance so I have more options but for the

13
00:01:12,560 --> 00:01:20,660
purpose of this lesson we want to create a C sharp console application so we can actually just search

14
00:01:20,930 --> 00:01:24,740
instead of trying to scroll through and look and try and figure out which one it is.

15
00:01:24,740 --> 00:01:30,680
We can search or we can narrow it down by selecting the actual language that we want the environment

16
00:01:30,710 --> 00:01:32,440
that we want to develop something for it.

17
00:01:32,440 --> 00:01:39,980
In this case windows and the whether it's desktop or mobile so once again based on the packages that

18
00:01:39,980 --> 00:01:42,860
you would have installed then you can get that filter.

19
00:01:42,860 --> 00:01:49,640
So I chose C sharp windows console and then I have two options I have a dot net core console app and

20
00:01:49,640 --> 00:01:53,210
I have a dot net framework console app no no.

21
00:01:53,210 --> 00:01:56,570
The difference between the two a dot net core console.

22
00:01:56,660 --> 00:02:02,930
It creates a project that allows you to create a console application that can run on Windows Linux and

23
00:02:02,960 --> 00:02:10,130
Mac OS over the traditional one open to core but it was just the regular button and framework which

24
00:02:10,490 --> 00:02:13,710
created a project that can run on Windows.

25
00:02:13,730 --> 00:02:20,630
So I'm just going to continue with the traditional Dot Net framework application for No.

26
00:02:20,690 --> 00:02:24,320
And then we can create a dot net core one later and compare.

27
00:02:24,320 --> 00:02:29,870
So when to proceed with the Dutton framework click next and then we give it 10 names some someone to

28
00:02:29,870 --> 00:02:37,660
call this test net console all right.

29
00:02:37,840 --> 00:02:42,120
So in the project name you want to avoid special characters as much as possible.

30
00:02:42,170 --> 00:02:46,750
And also you probably want to chemical case to make sure that it's readable.

31
00:02:46,780 --> 00:02:52,510
It is very case sensitive so if your chemical case or you have a mixed case word then rest assure that

32
00:02:52,510 --> 00:02:57,340
it will play a very big part in referencing anything inside that project going forward.

33
00:02:57,340 --> 00:03:04,300
This might be your default location based on your username or your full set up on your computer.

34
00:03:04,300 --> 00:03:10,200
However you can always go to browse and change where you want your projects to go.

35
00:03:10,240 --> 00:03:14,490
Next we have the solution name and I'll show you what the project name different from the solution named

36
00:03:14,560 --> 00:03:21,220
what we can actually choose a different solution name as the project goes in sight of a solution and

37
00:03:21,220 --> 00:03:23,920
a solution can have multiple projects.

38
00:03:23,920 --> 00:03:29,150
So these two don't necessarily always have the same name.

39
00:03:29,260 --> 00:03:29,530
All right.

40
00:03:29,830 --> 00:03:35,860
And then we can select the version of Dutton for more that we want so you can see that details backwards

41
00:03:35,860 --> 00:03:42,580
composer booths open to button it from work 2.0 or like I said each framework has you know the latest

42
00:03:42,580 --> 00:03:46,270
one has more recent libraries and support for libraries.

43
00:03:46,270 --> 00:03:50,650
But then what works in the latest one may not work on an old computer.

44
00:03:50,770 --> 00:03:56,530
And then what was done on the older versions might not be very compatible with say Windows 7 and Windows

45
00:03:56,530 --> 00:03:57,160
10.

46
00:03:57,190 --> 00:04:01,430
So you know choose your bottle carefully you know what your environment is.

47
00:04:01,510 --> 00:04:06,610
But I have a Windows 10 computer and I like to be on the cutting edge of things so I leave mine at Dalton

48
00:04:06,610 --> 00:04:08,950
and framework four point seven point two.

49
00:04:09,460 --> 00:04:16,300
And then I can just take a cursory glance make sure everything is good and then click Create

50
00:04:19,140 --> 00:04:25,890
once all of the preparations are done visit a studio with the launch and then we'll see code file followed

51
00:04:25,890 --> 00:04:28,560
by you know this wonderful interface and some other thing.

52
00:04:28,590 --> 00:04:33,150
So the first thing I'm going to do however is show you how to change the DART mode if you're not already

53
00:04:33,150 --> 00:04:40,170
in Dart mode and are interested so you can go to Tools then select options and then the very very first

54
00:04:40,530 --> 00:04:44,940
option in this dialog box is allowing you to choose your color theme.

55
00:04:44,940 --> 00:04:47,430
So you're probably on a light or blue.

56
00:04:47,460 --> 00:04:51,830
You have blue contrast and you have dark so you can to select dark click Okay.

57
00:04:51,930 --> 00:04:57,170
And then you will get this wonderful looking contrasted interface.

58
00:04:57,180 --> 00:04:57,870
No.

59
00:04:58,050 --> 00:05:02,690
Another thing you may note is that your solution Explorer is to your right.

60
00:05:02,760 --> 00:05:08,610
Mine is to my left I rearrange it that way because I find it easier to just move to the left to find

61
00:05:08,610 --> 00:05:09,330
the file.

62
00:05:09,360 --> 00:05:12,920
Sometimes I'm typing code here and then I have to move all the way to the right.

63
00:05:12,930 --> 00:05:18,810
I mean it's it's really a matter of layout and flexibility and how you prefer it.

64
00:05:18,900 --> 00:05:27,740
No visual studio allows you to put it the way you prefer it so you can actually drag any pain called

65
00:05:27,770 --> 00:05:34,110
MP and seek and drug drag any pain and then you can dockets where you once you see these little squares

66
00:05:34,110 --> 00:05:41,060
are tangles if you drag them into the space then it will kind of put you right in that section that

67
00:05:41,060 --> 00:05:46,470
is designated right or I can just leave it right there floating Well it's more of a humbug here in the

68
00:05:46,470 --> 00:05:49,380
middle of the screen than anything so I like my end to the left.

69
00:05:50,040 --> 00:05:56,430
So you can do that if you wish if you want more real estate sometimes you're writing code and Europeans

70
00:05:56,430 --> 00:06:02,130
are to the side you know open like this enter take him to what space you may not have a big screen and

71
00:06:02,130 --> 00:06:07,590
you want more space to do certain things you can always just unfinished so you see this pin is seeing

72
00:06:07,650 --> 00:06:13,050
auto hides I can make it auto hide how and when I need it I just click it and it comes out I do what

73
00:06:13,050 --> 00:06:19,290
I'm doing and then it goes back you'll also see that I have other pins that you know you may not have.

74
00:06:19,290 --> 00:06:26,190
So as the need arises and you feel that you need a pin you can just go to view and then you find the

75
00:06:26,190 --> 00:06:28,160
pain that you want.

76
00:06:28,170 --> 00:06:34,740
So for instance I have one here does is sequel server object explorer and that's like a mini database

77
00:06:34,740 --> 00:06:40,800
management system inside Vizio studio for this do to or you won't need that but then for other projects

78
00:06:40,800 --> 00:06:46,770
I work on I use it so when I expand it I see things in there but then I'm not going to be using them

79
00:06:46,770 --> 00:06:50,690
for this for this sets of lessons.

80
00:06:50,820 --> 00:06:57,720
No this code file that I had alluded to before this is our main code file for our console.

81
00:06:57,960 --> 00:07:04,800
So if I want to increase the font size I can just hold on on the control button and scroll in and you

82
00:07:04,800 --> 00:07:09,860
see I can screw it up or don't increase or decrease the size of the fund.

83
00:07:09,870 --> 00:07:14,730
So I'm just going to increase its a bit so that we can all see exactly what's happening on my screen

84
00:07:15,330 --> 00:07:16,110
in the solution.

85
00:07:16,110 --> 00:07:21,820
Explorer you'll see that the file name matches the class name.

86
00:07:21,820 --> 00:07:27,150
All right so I'm not going to teach you code in this particular list I'm just trying to point out some

87
00:07:27,150 --> 00:07:30,630
visual cues to make sure that when you see them you know exactly what they mean.

88
00:07:30,660 --> 00:07:31,320
Right.

89
00:07:31,320 --> 00:07:38,040
So we have the program not see us and see sharp files are stored as dot see us the class files get the

90
00:07:38,040 --> 00:07:42,900
extension that see us but then you see that you have other files with different extensions like dot

91
00:07:42,900 --> 00:07:48,330
config and as you put more and more in your project then you're going to see different file extensions

92
00:07:48,330 --> 00:07:54,060
for different purposes and being a bit more attention to the solution explorer you'll notice that you

93
00:07:54,060 --> 00:08:01,350
have this expunged mind a bit you have the solution and then you have and it does have a name so it

94
00:08:01,350 --> 00:08:08,220
says solution testing a console but then under that you see that it has another like a child right.

95
00:08:08,220 --> 00:08:11,580
You see that indentation that suggests that this is a child of the solution.

96
00:08:11,580 --> 00:08:15,930
So this is a project which then has the project files.

97
00:08:15,930 --> 00:08:21,590
So I was saying earlier that the solution doesn't necessarily have to have the same name as a project.

98
00:08:21,600 --> 00:08:27,450
As a matter of fact within the solution I can actually click and remove a project if I want or I can

99
00:08:27,540 --> 00:08:32,640
add other projects so if I wanted to console apps but I wanted them on the same solution.

100
00:08:32,640 --> 00:08:39,030
So when I open the solution which is my overall collection of projects then I would see every single

101
00:08:39,090 --> 00:08:45,020
projects I could have one to say hello world one to do math one to do other operations.

102
00:08:45,090 --> 00:08:48,660
And that's exactly how we're going to be building out our applications.

103
00:08:48,660 --> 00:08:55,200
I'm going to be using one solution and then we're just going to add a project her code example that

104
00:08:55,200 --> 00:09:02,670
we will be doing now at the top and I'm talking about this section that is underneath our toolbar and

105
00:09:02,670 --> 00:09:09,240
you see the little icon so you know you have that safe icon you have save all that's save all the files.

106
00:09:09,390 --> 00:09:15,900
So if you have multiple files open and editing I just want to make one massive save you just do save

107
00:09:15,930 --> 00:09:21,040
all but then you notice that the Google Keyboard markets along the way so you know it's easier to just

108
00:09:21,040 --> 00:09:21,670
do control.

109
00:09:21,670 --> 00:09:27,140
That's why they are writing code then to stop moving on from the keyboard and go all the way up here

110
00:09:27,160 --> 00:09:29,000
just to save or to save all.

111
00:09:29,080 --> 00:09:35,590
So along the way I'm going to be showing you a little keyboard shortcuts so that you can make your coding

112
00:09:35,590 --> 00:09:40,060
experience more efficient as you continue from the Save button.

113
00:09:40,060 --> 00:09:45,400
You'll see that you have some configuration settings they have Deeble year ever release you have any

114
00:09:45,400 --> 00:09:52,300
seat use their low to kind of determine okay what settings should I simulate when I am about to start

115
00:09:52,330 --> 00:09:52,990
my program.

116
00:09:52,990 --> 00:09:58,360
So you see that button with the green arrow and it says start you can just click that whenever you want

117
00:09:58,360 --> 00:10:01,990
to actually run your application or you can press it five.

118
00:10:01,990 --> 00:10:03,400
So I'm just going to start this once.

119
00:10:03,420 --> 00:10:08,380
Notice we didn't write anything Anderson to start it so that you can see what visual studio looks like

120
00:10:08,410 --> 00:10:13,930
when it's starting a program so it goes through what it calls a build where it compiles all of your

121
00:10:13,930 --> 00:10:18,590
code all of the code files that you have on the one project and then it will see.

122
00:10:18,590 --> 00:10:19,120
All right.

123
00:10:19,120 --> 00:10:22,570
Are there any arrows or syntax errors that I need.

124
00:10:22,570 --> 00:10:25,390
And then it launches what you call that console.

125
00:10:25,400 --> 00:10:27,160
So that console looks like command prompt.

126
00:10:27,160 --> 00:10:31,380
I noticed it just flashed off the screen because well it did exactly that.

127
00:10:31,390 --> 00:10:35,590
It launched the console and then looked inside of our main function.

128
00:10:35,590 --> 00:10:38,740
The main function didn't tell it to do anything so it came on the screen.

129
00:10:38,920 --> 00:10:45,020
So that's nothing to do so it came off so that so console applications were they run and they do off

130
00:10:45,040 --> 00:10:52,500
task until they're completing the half completed the task and then they just exit automatically.

131
00:10:52,520 --> 00:10:54,950
Now that's a very quick tour of visual studio.

132
00:10:54,970 --> 00:10:59,760
We have lots of work and a lot of catching up to do so I want to end this one here.

133
00:10:59,830 --> 00:11:03,910
And then when we come back we start writing some C sharp programs.
