00:03 what's up guys this is teddy welcome to
00:05 my youtube channel in this video i'm
00:07 going to be doing a very
00:09 very long awaited video this is a video
00:12 that i've been looking forward to making
00:14 for a long time and i'm almost getting
00:17 butterflies just thinking about the
00:19 anticipation leading up to this video um
00:24 i am a professional c-sharp developer i
00:29 sharp has provided me with an insane
00:31 living that i can only
00:34 you know dr like i could have only
00:36 dreamed of like the lifestyle that i
00:40 i'm such a proponent of c sharp because
00:42 there's so much opportunity in it like
00:44 there's so many jobs there's so many
00:46 high paying jobs and i honestly just
00:49 love exposing people to c sharp and
00:52 showing people this enthusiasm because
00:55 it really gets people excited and i
00:57 think it's also when people get excited
01:00 about programming because you're going
01:02 to open so many doors in your life that
01:04 you're not even going to be able to
01:08 the fact that i am able to actually get
01:11 out here on the internet and teach
01:13 people how to learn c-sharp is literally
01:19 i went all out on my setup i've went all
01:22 just so that this can be
01:25 hopefully the best course that you have
01:27 ever seen on c sharp and i'm gonna make
01:29 it weird i'm gonna make it fun and we're
01:32 gonna have fun through this whole entire
01:34 thing and i want you guys on this
01:37 journey as we climb to the top of the
01:39 c-sharp mountain and
01:42 you will all you know get jobs and
01:45 realize your full potential which is
01:47 what programming is all about so
01:49 let's go on this journey i've even
01:52 uh i've got a whole gaming pc that i've
01:56 uh wiped i wipe to clean a whole entire
01:58 gaming pc so we're literally starting
02:00 from scratch on this one we're
02:02 installing visual studio on image on a
02:05 clean machine clean setup and i'm going
02:08 to be right here with you guys and we're
02:10 going to crush this thing together so
02:14 um you're going to need visual studio
02:18 i've thought about making like a visual
02:20 studio code tutorial but
02:22 if you're trying to become a
02:24 professional c-sharp developer you're
02:27 going to need visual studio
02:29 if you are somebody who has a lower
02:33 pc power is a big thing um vs code might
02:37 be something you want to look into but
02:39 if you have eight gigabits of ram solid
02:41 processor you're probably not going to
02:44 have too much trouble with
02:46 running visual studio
02:49 what is the difference between visual
02:51 studio and visual studio code
02:53 visual studio is going to have
02:56 everything that you need to be a
02:57 professional c-sharp developer
03:03 industrial i call it industrial grade
03:05 debugging you've got lots of extensions
03:08 you've got all types of diagnostic tools
03:12 everything like i said everything's
03:14 going to work straight out of the box
03:15 it's the great thing about visual studio
03:18 is that you can get all the tools in
03:20 visual studio code but with visual
03:22 studio a lot of the
03:24 things that you're going to be doing as
03:26 a professional c-sharp developer are
03:29 done with a gui it makes things easier
03:32 it is a little bit more complicated to
03:34 learn but i'm going to give you guys a
03:35 couple of hit a couple of hacks couple
03:37 tips so that when you're out there you
03:40 know doing your thing you don't get too
03:42 tripped up and i'll almost include a
03:45 visual studio tutorial too here in a
03:47 second so let's just go ahead and dive
03:50 in here we're going to
03:52 pull up just pull up google chrome
03:55 any type of any type of browser will
04:07 so let's go ahead here
04:14 google chrome's gonna take me through
04:16 all of this i don't even know what this
04:18 is but just type in
04:26 download yep this is the one that you
04:29 want you don't want mac you don't want
04:31 visual studio code you probably want
04:33 visual studio code for javascript but
04:36 for c-sharp development you're going to
04:38 want to download visual studio you're
04:40 going to want to click visual studio
04:42 community unless you
04:45 already have a job and they're going to
04:46 provide you with that when you get a job
04:48 they're going to provide you with all of
04:49 this so you're not going to have to pay
04:53 community edition that we have right now
04:58 this has changed this not this used to
05:01 not be as complicated so
05:03 we're kind of learning together guys i
05:07 okay yeah here it is right here
05:11 what was i thinking okay silly me all
05:13 right so we've got the installer the
05:16 great thing about visual studio is that
05:18 a lot of this is just going to be
05:19 automated like this is all going to be
05:22 um it's relatively straightforward but
05:25 i'm going to go ahead and kind of walk
05:27 you through it so you're going to get
05:30 right here oh sweet there you have dark
05:33 you want asp.net web development you
05:37 want azure if you're going to be working
05:39 a professional environment you probably
05:42 i would install azure for now
05:44 just in case but you're going to need
05:46 this if you start working or if you
05:48 start working on serious apps you're
05:49 probably going to need azure
05:51 i'm a python hater i've you've already
05:53 seen some of my other videos on why you
05:54 should not code python because i coded
05:56 in python for years and never got a job
06:00 another story for another time node is
06:02 the same story node is the exact same
06:05 thing i always err on the side of don't
06:08 download download these separately
06:10 because whenever i have downloaded a
06:13 clean install with either one of these
06:14 like it just never really works like
06:20 net desktop in theory you really don't
06:24 net web development but for all
06:26 intensive pers purposes if you're a
06:28 self-taught developer like i was and
06:30 you're trying to get a job you
06:32 definitely want to start looking at web
06:33 development and net but if you really
06:36 just don't want to install anything i
06:38 guess you could just go with the desktop
06:40 although i would not recommend it you
06:42 could also do mobile development if you
06:44 want to do mobile development too tons
06:46 of xamarin jobs but for this video
06:49 we're just going to stick with the
06:51 relative bare essentials and go ahead
06:57 so as that's downloading i guess i will
07:02 what is dot net what is you know what
07:05 are all of these terms so if you
07:07 probably already heard of c sharp dot
07:10 net is going to be more so
07:13 it's a framework that you're going to be
07:15 using it's almost like dot-net is an
07:19 all-in-all and concept encompassing
07:22 umbrella to where you can down or to
07:25 where you can build desktop apps you can
07:27 build web apps and you can actually
07:31 mobile apps as well and there's tons of
07:33 other things that you can do but think
07:35 of.net is almost like a framework that
07:37 gives you the tools to make your
07:39 development life a lot easier so let's
07:43 you want to code some type of networking
07:46 utility instead of having to dig into
07:48 the internals and do all of these crazy
07:51 um things that include you know
07:53 designing like your own network protocol
07:56 or something you could just have the net
07:58 framework all of that would be done for
08:01 you and it's more abstracted like i said
08:04 in programming you're standing on the
08:06 top shoulders of giants like very rarely
08:08 do i design any of my own software most
08:11 of the time i'm using other people's
08:14 look at it like that don't get so
08:16 freaked out and programming that you
08:18 know i'm gonna have to design like my
08:21 um you know networking protocol or you
08:23 know i'm gonna have to design like my
08:25 own program to make my own desktop
08:27 applications all of these tools are
08:28 given to you in visual studio and it's
08:31 going to be easy to do
08:33 there's also talks too
08:36 many people want to know
08:38 you know what makes c sharp you know why
08:40 do people even code in c sharp c sharp
08:43 is going to be a good medium between a
08:46 very uh abstracted language like python
08:49 and a very low level uh
08:52 uh programming language like c or c plus
08:54 plus so you're going to get a lot of the
08:56 abstractions and productivity that you
08:59 get with python like you're you know
09:01 you're not going to have to dig into the
09:02 internals as much but you still get the
09:04 flexibility or in the robustness and
09:08 kind of the uh preciseness i guess the
09:11 word would say of a lower level language
09:13 and you kind of get that middle in
09:18 this also has to do there's also a term
09:20 called the clr like what is the clr
09:23 you're going to see that term a lot so
09:25 in a normal programming language the
09:28 compiler does all the work and it
09:30 transmits it and or it turns it into
09:32 byte code but with java and c sharp you
09:36 also have another little layer there or
09:38 another little part of the sandwich as i
09:40 call it to where first you have code
09:43 then it's computed through the clr and
09:45 then the clr turns around puts it into
09:47 the compiler and then the compiler turns
09:49 it into bytecode and that's how you get
09:52 the ability for c uh sharp to be run
09:55 anywhere that's kind of the jvm with
09:57 java too so if you've ever heard of the
09:59 jvm um the clr there they are different
10:02 like i'm not gonna you know i'm not an
10:04 expert on these things they are
10:05 different the jvm is different from the
10:07 clr but think about like that it's an
10:09 extra little you know
10:11 middle piece of the sandwich that makes
10:13 it so that you don't have to write like
10:15 this crazy low-level code and you can
10:18 actually just uh write very abstracted
10:21 code that's very powerful and can be run
10:26 here we go we are downloaded we are at
10:30 so kind of running out of things to say
10:33 kind of get a little bored here so in
10:35 this case i'm just gonna cut it out
10:37 gonna wait till it actually downloads
10:40 and then we will jump right into the
10:44 okay so we have installed visual studio
10:48 next thing that we need to do is
10:51 simply just open it like there's nothing
10:55 there's no real secret you just open it
10:58 uh my camera died in the process of
11:00 making this so i actually have like a
11:04 main thing here is this is just a splash
11:06 screen i really wouldn't get too you
11:08 hot and bothered about this one
11:11 what you want to do is you just want to
11:13 create a new project
11:14 next thing you're going to be brought to
11:16 this little screen right here
11:19 this is where you choose what type of
11:21 framework that you want to use like i
11:23 said mentioned before dot net framework
11:26 gives you major capabilities when it
11:28 comes to creating web websites mobile
11:31 can't do mobile because i didn't install
11:33 xamarin if you want to make mobile apps
11:35 you're going to have to go back to that
11:36 install screen like i showed you and
11:37 download xamarin because i didn't
11:39 actually install it
11:40 there's also cool there's like blazer
11:45 may do a tutorial on blazer
11:50 for these circumstances what all that we
11:52 need is we just want a good old console
11:55 app and if you're familiar with hello
11:57 world or any type of console app
12:01 you know it's relatively simple and if
12:03 you don't know exactly what it is i'm
12:05 going to show you so we're just going to
12:06 call it hello world
12:08 tutorial because i already have one
12:11 hello world app for where my camera died
12:14 going in here we're going to be using
12:18 probably wouldn't fool around with this
12:22 if you're using net 6 or
12:27 you're going to be shown a
12:29 i'll show you exactly what it looks like
12:32 uh pull pull it up here
12:36 see yeah i actually googled it just so i
12:40 could show you guys beforehand so
12:42 this is what you're going to be showing
12:43 if you download before.net 6 you're
12:46 going to have this little thing.net 6
12:48 doesn't actually have this
12:51 this is an entry point for the program
12:54 so with dot net six you're actually not
12:56 going to have any of that and you are
13:01 what i'm about to show you
13:04 so so more on this so an entry point
13:08 as it's sometimes called is where
13:10 everything starts it's almost like the
13:12 point of conception with you know the
13:15 ovary and the egg and
13:17 you know if you take in sexual education
13:19 you know what i'm talking about it's
13:20 like the point where everything starts
13:22 in the app and even
13:24 large apps like even if you had like at
13:27 my work there's a point where that app
13:30 actually executes and this part right
13:33 is what that is it's the point of origin
13:36 for the app and for you to actually
13:38 execute code before this
13:41 you had to have it within this function
13:45 kind of a confusing topic and
13:48 it takes a while to like actually
13:50 understand like how this work like you
13:52 can understand how this works like just
13:54 from me explaining to you but to
13:55 understand understand how this works
13:57 takes a long time so we're just going to
14:01 kind of it is something you don't even
14:05 when you first start visual studio it's
14:07 a lot to take in like i'm not
14:11 you know even gonna like seeing this for
14:13 the first time can make your eyes glaze
14:17 one of the first things that really
14:18 trips people up is most people are used
14:20 to visual studio code i'm i'm actually
14:23 used to visual studio code so i just
14:24 bring this over here
14:26 um and i think that that looks a lot
14:28 better and actually get rid of that
14:30 because i you never use that and
14:34 is um where you can
14:36 uh manipulate your package so packages
14:41 kind of like node packages or
14:44 um node modules or like when you type in
14:48 um there's nougat or nuget some people
14:51 call it so a new jet package is almost
14:53 like an npm package in node.js or it's
14:57 almost like a pot like when you
14:59 do like pot like python where you have
15:03 um cv or something or you're bringing in
15:06 some type of module it's the same exact
15:07 thing but it's got a nice little gui
15:15 a huge portion of your life is going to
15:17 be spent in this right here so
15:22 one thing that people really kind of
15:24 like get freaked out about is what's
15:29 in dot net in the microsoft world
15:32 your whole entire project in order for
15:34 it to uh work well with visual studio
15:36 it's going to be wrapped in what's
15:38 called a solution because
15:40 in any programming environment you're
15:43 going to have multi like in this one we
15:45 only have one but if you work in
15:47 multiple uh or if you work in a
15:49 production environment you're gonna have
15:51 many of these and this solution is like
15:55 what wraps all of these projects into
15:58 one and it helps you keep track of them
16:00 so the solution thing like uh throws
16:03 people off a lot uh many people are
16:05 wondering like what is this like what is
16:10 you never are going to usually fool
16:13 around with the dependencies mostly when
16:16 whenever you are looking at a c-sharp
16:18 program this is going to be the most
16:20 important part uh cs is what you're
16:24 going to actually be writing code in and
16:26 what is actually going to be
16:28 um you know manipulating the program or
16:31 like what you're actually going to be
16:36 like how do you actually get this thing
16:38 to start like what does it entail really
16:40 and even in a web development in a
16:42 mobile environment the way that you get
16:45 your program to run is you just go up
16:48 that's pretty much it
16:50 so we're going to click it it's going to
16:53 run and you're going to see a bunch of
16:55 gibberish here but really what's going
16:58 to happen is this just this window is
17:00 going to pop up you're going to see
17:02 hello world and that is pretty much it
17:06 it's a console application it's not
17:11 for most like 95 percent of people
17:13 you're probably not going to be using
17:17 console application
17:18 that much like console applications are
17:25 like let's just put it that way so
17:28 we'll go ahead let's go in here and
17:30 let's type let's do something a little
17:32 bit cooler than hello world so we've got
17:36 uh up here you've got your new console
17:39 template which will tell you a little
17:41 bit about what it is so console
17:50 why do we even have like why do we even
17:52 have a console and why
17:54 is it even called why can't you just
18:00 or print like python does
18:05 c sharp is a older it's a lot older of a
18:08 programming language and i think a lot
18:10 of this stuff is just
18:14 uh previous you know i think there's a
18:17 saying like steve jobs like one time i
18:20 heard steve jobs say that
18:22 if you look at programming enough a lot
18:24 of times you'll see the bedrock and this
18:26 is kind of like the dinosaur bones of
18:29 the past age of when people actually
18:32 were worried about console apps like you
18:34 had to print stuff to a console and back
18:37 in the 80s or back in the 90s a console
18:39 application was probably a pretty big
18:41 deal before nowadays when we're so
18:43 leveraged and we have all these crazy
18:45 mobile apps so a console
18:51 so we go in here we type in console
18:55 and we're gonna make this one insult us
19:08 yeah we're ultra elite so double zero
19:13 one important thing that you're going to
19:15 have to realize about
19:17 net or c sharp is that you need
19:19 semicolons if you don't put a semicolon
19:22 after each statement it's not going to
19:24 work and it's going to give an error so
19:28 let's go ahead and let's see what it
19:29 looks like when it gets an error so if
19:32 you get an error you're going to get
19:36 you can click don't show this again
19:38 but i just click no
19:41 and that's when it's going to show an
19:43 error for you and it's even going to
19:45 tell you down in this part right here
19:48 what was the actual error and it's going
19:51 to tell you the exact same thing
19:57 and give it a minute it will check it
20:06 let's take a little bit
20:16 i don't see why it wouldn't
20:28 okay i honestly don't know why this
20:37 okay there we go yeah i don't know
20:38 sometimes it just messes up like that i
20:40 honestly i don't i don't know what that
20:45 type in this console right line right
20:47 here this is going to pop up in the
20:50 debugger and that's pretty much it so
20:55 i'm just going to give you guys a couple
20:57 more tips here if you ever like mess up
21:00 this right here and you can't get it the
21:03 way that you want it you can just type
21:05 in reset and you can just type in reset
21:07 window layout and it will automatically
21:10 uh reset everything for you
21:14 there's no hard and fast rule about how
21:17 you need to actually lay stuff out you
21:19 can lay it out however you want to and
21:24 you're not going to have to worry about
21:26 any type of like standardized way that
21:28 you should actually lay all of your
21:31 that's another thing another very
21:34 important um tactic that you want to
21:38 is you want to learn how to debug debug
21:41 is very and crucial debugging is so
21:44 crucial in uh development so
21:47 in this case we already have the debug
21:49 it's going to debug by default if your
21:52 computer is very slow you can debug uh
21:55 you can start without debugging or you
21:57 can start with debugging if you want to
21:59 start without debugging and you don't
22:00 want to have that debugger um you can go
22:02 ahead and press ctrl f5 but for this
22:05 purpose let's go ahead and let's make a
22:08 couple variables so
22:15 and we're going to pass in just some
22:18 quotes and we're going to type in
22:23 make sure that we have a semicolon
22:25 because you cannot start it without a
22:26 semicolon and then we will go into here
22:31 our console.writeline you can tab tab to
22:34 accept it and we're going to go ahead
22:36 and the intellisense works phenomenally
22:39 so we're going to pass in our variable
22:42 right here and we're going to debug it
22:45 simplest program to debug and this is
22:47 very important uh i've never seen
22:50 anybody else teach anybody like how to
22:55 what it's going to do is it's going and
22:58 this is amazing like uh these tools are
23:00 absolutely phenomenal so you're going to
23:02 go in here and it's going to give you
23:05 it's going to tell you like what all
23:07 these values are and it's really awesome
23:10 because a lot of times you can see all
23:12 types of really cool
23:14 uh values like you can't see when the
23:17 program is actually running so i implore
23:19 you to just kind of go in and check out
23:22 some of uh just to debug something just
23:24 like get get a little curious you know
23:26 let just see you know what's going on
23:29 with the program and debunking is going
23:31 to be the perfect way to do that and the
23:33 way that you do it is you make sure you
23:34 set your button and then you go up here
23:37 and you go to as you want to execute it
23:40 you type in step over
23:42 and then it's going to step over into
23:43 the right line and once again
23:51 it's okay takes a while to become a
23:56 it took me two years to become a
23:57 programmer uh but yeah
24:00 we are noobs but that is okay we are
24:02 going to keep going and hopefully our
24:05 computer won't insult us anymore and we
24:08 move on to doing better core things and
24:12 learning some more so hopefully
24:16 oh another thing another great trick
24:19 that i'm going to teach you guys
24:22 like how do you actually like inspect
24:23 things like what do you want like if you
24:26 want to see like what's in this right
24:27 here what do you do
24:29 all you do is you go to you right click
24:32 and you go to definition
24:37 what's in like you can actually see kind
24:39 of the source code you can't see the
24:40 whole entire thing i think a lot of the
24:42 they have yeah they just give you a
24:44 summary they don't actually let you like
24:46 go in and see exactly what it is
24:48 they could but you can see a nice little
24:50 summary of what it is and you can kind
24:52 of whoa like what's all this cool stuff
24:54 this is all extra think of this as
24:57 you go into the options section and you
24:59 can kind of see like what's going on
25:00 behind the scenes and you can add like
25:02 your own properties and be like hey
25:05 what if i want to pass in an object oh
25:07 sweet like i could pass in an object or
25:10 you know what if i want to
25:12 you know do some other thing what if i
25:14 beep hey i can beep and you would have
25:17 never known that if you didn't go in
25:19 there and actually like look into
25:21 the if you didn't go to
25:23 like look at the definition and i'll
25:25 show you guys how to do that one more
25:26 time just for uh yeah and you can also
25:30 press you can also peak it if you don't
25:32 want to actually lose your place and
25:38 and another thing is is that there's
25:42 if you click on that and it doesn't go
25:44 anywhere next thing you want to do is
25:46 you want to go to impul and
25:48 implementation and it will also
25:51 hopefully do the exact same thing
25:52 there's a little bit it's a little bit
25:53 more complicated than that but just so i
25:56 don't confuse the beginners just cook
25:59 just do the impul and you're going to be
26:02 but anyway that's going to be my
26:04 beginner c-sharp tutorial i really hope
26:06 that you guys enjoyed this video stick
26:08 around because there's going to be way
26:10 more coming we're going to be doing
26:11 variables next i hope that you guys
26:13 enjoyed this video if you did smash that
26:15 like button make sure to subscribe make
26:18 sure to check out some of my other
26:19 videos love you guys and as always thank