How to Program in C# - Variables (E02)
HTML-код
- Опубликовано: 12 май 2024
- Let's have a look at variables!
► Check out Milanote for free: www.milanote.com/brackeys062020
► Milanote for Mobile: www.milanote.com/download-mob...
● Watch the previous video on C# Basics: • HOW TO PROGRAM - Getti...
● My Solution to the Challenge: bit.ly/2Vdf5li
👕Get the new Brackeys Hoodie: lineofcode.io/
····················································································
❤️ Donate: www.paypal.com/donate/?hosted...
► Join Discord: / discord
● Website: brackeys.com/
● Twitter: / brackeystweet
● Instagram: / brackeysteam
····················································································
► All content by Brackeys is 100% free. We believe that education should be available for everyone.
❤️ Donate: www.paypal.com/donate/?hosted...
····················································································
♪ "ES_Dress Code_Black - oomiee" by Epidemic Sound
I DID THE HOMEWORK YOU GAVE ME WITH NO HELP, I've never felt so happy
that was so easy lololol
@@itsclaver7125 some of us are new at coding claver...
@@itsclaver7125 Some people are new stfu
I know, right? I had the biggest smile on my face, it just felt so good to have made something all by myself!
@@itsclaver7125 stfu
6:09 “Displaying a name isn’t very exciting.”
It is when you have absolutely no confidence in your coding abilities
yep, first time coding and thought this was going to be a pain for just this
69 likes
Interesting tip: When you're declaring variables (not assigning a value to them), you instead of writing time on a seperate line for every variable, you can actually do this in 1 line.
Example: **int a, b, c; ** is the same as:
int a;
int b;
int c;
Lol
I'm bored
Haha
It's
A
Prank
Get rekt noob
every day we stray further from god
No we get closer to God lol
Almost too close
@@mosquito_hate OH YOU LITTLE S-
well played
I hope you don't break your finger lol
Well now you did
Sorry ily bro
#nohomo
I apologize if you're a girl lol
Variables in C#: Store Information
Variables in Math: Hippity Hoppity your happiness is now my property
Dani 😂😂
Variables in math are mainly just float variables
@@knifeninja200000 Yeah, they are.
Hey everyone! I want to keep this short and simple to not waste your time 🙂 I recently started a coding discord server for people who likes to code or just want to learn how to code. We have multiple users who are very experienced in diffrent coding languages and would love to help everyone so if this sounds intesting you are more then welcome to join the server: discord.gg/rNwnb2e
@@vincent-ox5rz SHUT UP NOBODY LIKES YOUUU
The comments: ALready know everything im just watching it because its brackeys,
Me: Im watching TO LEARN!!!!!
Same for Me!
yeah
im glad im not the only one xD
Almost same
don't let that bother you. just focus on understanding and practicing what you are learning to better understand it.
if you need help Brackeys has a discord server with a channel to ask programing questions.
Friend: whoa how do learn c# like that?
Me: Brackeys is a pathway to many abilities some might consider unnatural
that do be tru tho
I have learned so much in the last 8 months from RUclips that I never thought I could code even games I've done so far. I can even take part in Game Jams and finish a quite polished game in under 40 hours of work. I thought I couldn't even take part in ludum dare in a few years but I think I'm ready.
Mr Hitler wishes you good luck ^_^
VBFilms
@@VBFilms how did you learn? Just brackies? I'm just starting to learn, and am watching these tutorials.
@@pugiguess6548
Check my other channel here on what I've learned so far. ruclips.net/channel/UC0fZn0XcjRZNxakHUXC277A but basically decide on a smaller game you want to make. Then start building it piece by piece. A lot of the tutorials give good insight on basic stuff but the real difficulty comes from connecting the pieces together. Where I actually learned the most was Charger Games here on RUclips. He has a few 4 hour videos on C# and then by following his tutorial on a 2D Racing Game taught me all the basics. After that it has just been google and Unity documentation.
So in the end it's not about the complicated stuff. I see a lot of people askimg questions like "teach me how to make mmorpg/rts?" If you dont see what is wrong with questions like those you still need to learn more about the basics.
As someone who was scared to enter the coding world Brackeys has made learning C# extremely easy.
Brackeys: Today were going to learn about Variables!
Me who has been using scratch for 4 years:
i am 4 parallel universes ahead of you
This is too underrated
Haha scratch mit edu goez BRRRRRRR....!
same
Same
Relatable
I've watched several tutorials on coding before but it always felt like I was just manually copy pasting what the tutorial said. I actually am understanding how everything works with this tutorial which allows me to create things on my own via code. Thank you.
Same, all the other tutorials were way too.. Idk how to put this... they were too specific, I am truly learning from this video.
Me Too Bro, It Was Just Like I am Stelling Codes!
yea dude brackeys is the best to learn from and actually understand
Same bra
I wish there was a complete series covering every basic. These tutorials are really good, better than anything I’ve seen before. Very descriptive, and still makes it even enjoyable to watch.
I've done the "homework" for episode number one, I made a small story for it, and it was SO MUCH FUN! I can't wait to watch this episode! I have only one thing to say: Brackeys, THANK YOU VERY VERY MUCH! I appreciate the work that you have done and hours spent for such awesome content!
What'd you do for yours? Mine was
This is the tale of a fellow named..
(This is where you put a name, I chose beebo)
...was an odd fellow. They would prance around
(An adjective of sorts, I chose naked)
While chasing random citizens..
Until one day he was
M U R D E R E D
(Murdered is in red)
I feel like this is one of the most non toxic coment section EVER! I love how there is no arguments or controversy
I watched like 5 tutorials on youtube, and a single and smaller tutorial from him is better and gives me more information than all these 5 togheter
@@rajsikri9364 Nice comma you baboon
@Anshnoor Singh agreed
I'm not actually watching this because I've watched about a million programming beginner videos, but as soon as we've got the very basics out of the way, I'll be on board. Also I really like the thumbnail.
Der SPS me too
then why not watch it again? (jk)
gamer i almost didn’t read the “(jk)”
Aditya M. Close call eh
Kind of a waste. The basics should be covered by... September?
IF YOU HAVE ANY PROBLEM WITH DEBUGGING THE PROGRAM REMEMBER TO CHANGE THE STRING
IN LAUNCHE.JSON
FROM: internalConsole to externalTerminal
It still doesnt work for me
@@mariusholten5740 try changing the letter size
You Sir saved me from pulling out my hair, thank you!
@@ggame1022 what if this still doesnt fix debug ussues and his says something different on the first few lines of code with class and whatever all that is
Oh my god thank you so much! I have been trying to figure out what's wrong for the past 2 days!😅
The parts are coming so slow, i don‘t know if people should watch this series already to learn something. I would wait for the last part and then begin with it or watch a second series too, so you get constant input.
yes please make video at least 5-day per week
I write down notes for me after every part. Otherway I would forget everything xD
Content is fine. But at this pace, it will take months to get to the cool stuff. No pressure but, couldn't the serie be longer or more frequent?
I already learned to use inheritances within two days.
true :/ i love the series but soooo slow
It's actually bad pedagogy. The time in between lessons is too long to be able to have the last lesson clearly in memory when you get to the next one. People might not see it as a problem now, but I think it will be felt once more complex concepts come into play.
The gap should be 3 days at most.
ive been watching these videos over the last couple of days in the evenings and following along and id like to say thank you for this great content, youre making it very easy to learn from nothing and your homework tasks are super helpful too in learning to apply the info. its super cool that you're making these lessons for free for the user. thank you
Thank you for making these. I've wanted to learn coding in the past but never knew how to tackle it. The little challenge at the end makes it even better because it made me use what you just said on my own unlike most tutorials I've found.
I was doing a course on c# when I came across this series. You have no idea how much visuals and a person help me learn programming. Thinking of variables as types of containers really made a difference for me. Thank you
These series are being so good and helpful. Can't wait for the next video to come out!!! Great job!!
This is a good video, I am learning really quickly as I have had coding experience before. It's sad that you've stopped making content.
The moment you realize that you learned variables in his last how to make a game.
I made an simple calculator without this tutorial cuz unity and c#
@@valzzu good for you
Dammmmnmmmmmmmmmnnnn that happened with me yesterday
@Dylan McGrath yeah. check my YT channel if you what. Totally not bothering you to watch it..... still not..... nope...... ok maybe a little......... PLS! its minecraft videos
lol same
I had to press pause for a bit just to tell you how awesome you are. You are a great teacher! Your explanations are wonderfully clear. And I said this before, but your smile and your voice are SO pleasant, it makes all the difference in learning and understandig. I might even be secretly mancrushing here, hahaha.
These tutorials are really helpful, i am waiting for the next episode, keep up the good work!
It's cool when somebody explains the basics! There was not enough videos like this, when I learned programming from the beginning.
These tutorials are so helpful and doing the "homework" after really helps the code stick in your head
small tip i have: you can define multiple variables of the same type in the same line.
for example
type name, name2, name3;
name = value;
name2 =value;
name3 = value + value2;
Awesome video as always, this channel is always my first go to place when I need to find a specific Unity or programming task.
honestly the best tutorial so far. all of the other tutorials were either outdated or made no sense what so ever but my main man brackeys coming in clutch
I really could use this tutorial a half year ago, but now I‘m pretty fine at C#. But I‘m still glad that you make videos for beginners and for the people who are starting to games this is a super duper tutorial.
So true. His How To Make A Game series is really great but he didn't go very in depth with the coding part. It took me weeks to learn that functions can return variables, because I just jumped right in to Unity instead of learning C# properly.
how did you learn?
Mainly RUclips tutorials, but google helps too and over the time it fits. Learning by doing that’s my advice. Create as many scripts as you can and suffer as often as you can. It really helps correcting your own mistakes!
@@thunderboii1903 okay! Thanks!
I'm 31 and just started learning programing. You are a really good teacher. Love this! :)
sadly he quited programing 7 months ago
@@utkuberkentekinsoy8900 and you left this comment 7 hours ago
@@crychock5766 and you left this comment 2 months ago
This is making things SO much easier for me. Thank you Brackeys!!!
Please keep making more videos, I'm learning so much with you! Thanks a lot!
hi
yes..I am following this path..Thanks!
Thanks
very true.
Im watching the video 3 times over and writing down everything he says.
Thank u
I'm so happy he made the next vid, I was kinda sad that last week he didn't make the next vid, bit whatevs.
Btw, Isn't this the same as his older vid, that he made like three years ago
Another edit: Each time we complete a challenge, must we just delete that code
this is a more updated version. it was made 6 years ago FYI.
@@hypehextech4680 oh thanx
"must we just delete that code (?)"
you could either do that but another option is to comment it out using "//". in which case it wouldnt execute and run it would just skip that line
attempt one at trying to be smart
"Must we delete that code?"
My approach is to have one program using every piece of code shown in these videos, and as soon as other parts come out make it even more complex.
I've already made the conversation challenge and now spiced it up with variables.
man i love that you always do a challange at the end that makes it the best tutorial serie
i felt like i the wait for this video was at least a year. i love these, this is the first time in my life i have ever properly learnt anything from the internet
Me: watching brackeys videos when I already know all the content
yeppp!!!!
sometime comeback watching this is soothing. Is it only me.
@@howdy9517 naw I watch brackeys vids in the background just cause they're so calming and good
same :D
Ditto 🙂👍
Please SUPPORT HIM or he wont make others episodes of this course, and I NEED others videos.
I started by watching the first video in the series on how to get into coding. And I did the challenge at the end of the video on my first try. I'm surprised by how intuitive this is. My main goal is to make a simple game by the end of 2021. Thank you for teaching me. I will now go on and finish the rest of this series before I go to bed and think about this some more.
Thank you, Your tutorials really help and I feel like I'm actually understanding with these tutorials. Also I beat your the first 2 challenges
I felt very happy after making a super simple calculator
me too
If anyone is having trouble here is the code to solve the question:
Console.WriteLine("Give a number");
int number1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Give another number");
int number2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Give a third number");
int number3 = Convert.ToInt32(Console.ReadLine());
int sum = (number1 + number2 + number3);
int mean = (sum / 3);
Console.WriteLine("The mean of the numbers is "+mean+"!");
If you swap (int) with (double) you can use decimal values in your variables/results.
AS a complete newbie to coding. I have to say you have done quite a good job of explaining things! I understand it ! Thanks!
Thank you so much! Since I was 10 I wanted to learn how to program but never found the right course, now I feel on the right track and hope to continue learning from your videos :D
The moment he only showed decimals as commas instead of periods. NA gonna be maaaad.
I respect it.
I don't use commas for decimals,
but I respect it.
i don't understand whatchu mean by that but then again i'm an amateur developer.
Yousif Al-sewaidi In USA they type 5 point 5 like 5.5 but in most other (basically all) countries they use commas instead of dots, so 5,5. Just like fahrenheit... metric system... time system, length... everything really.
Anton B I don't think in most other countries they use commas for decimals.
@@djeieakekseki2058 Yeah I'm from the UK and we use periods.
@@antonb5504 i have lived in 3 different countries but never seen a comma for decimals, donno wat you talking bout
Me knowing C#, java, c, c++, python and others programming language : wow. Interesting.
well when you know c++ you know c for sure, so you cant really count that. java and c# are also really similar to c++. Techincally, you know 1 langauge with different ¨extention¨. Im just saying
@@master.9202 how the fuck is java and c# similar to c++?
I think he saw the basic syntax {}
Common in three languages...
But basically c# is similar to Java
@@master.9202 c++ is not simillar to java actually but It's(c++) the most difficult programming language.
If you already know the languages, then why are you watching a basics video? Did you just need a place to assure others of your sense of self-importance? It’s like going into a kindergarten class and making fun of the teacher for teaching kids how to read. Ya basic.
This is the best coding channel and everything here is really genuine
it felt so great for me to do the challenge and figure out how to get the average of three numbers without you telling me exactly how to do that. these videos are awesome.
Brackeys, When I try to make a ReadLine/WriteLine, it says “Console does not have a definition for ‘ReadLine/WriteLine’”
making sure "using System;" at the top of your file will fix your problem :).
Thank you SO MUCH
But now it does not show on the console
@@gunwattiseeram7221 Got to launch.json, look at line 17 change internalConsole to externalTerminal
@@xyloftalexander4369 you are my hero lol
Brackeys: here's a challenge!
Me: * uses methods and classes to do the challenge *
Brackeys: No! That's not how you're supposed to play the game!
This guy is my teacher and inspiration love man and the work you are doing
In school they showed me how to do this in python, but i needed to wait for 7 years... Now u come and show me it in like 3 weeks. You are a real hero!
6:14 When he deleted that code I felt Rick Rolled D:
Console.WriteLine("Challenge Accepted" + Completed);
I am actually proud of myself I did the challenges from the first video and this one correctly so I'm feeling pretty good, These videos make me feel like I'm good at something
Please do more of this series, it's very beginner friendly so suits well for courses
I somehow knew userName was going to be "John"
Anyone else watching this even though they know c#
(Y) S ame
Me
Yes
Yes. It me.
Mee
YOUR VIDS ARE THE MOST HELPFUL THING EVER THANK YOU
The projects is the best part, it’s faster to learn for me. So i thank you for these videos❤❤
The bruh moment when you learned c++ and realizing that it's nearly the same thing.
It isnt. I is very different in many ways. For example classes. They r very confusing in c++ when u first learned any other language
I have also learned C++ and I liked this language as it very much similar to it
me: 5 and 2
calculator: 4
how
same 45 and 4
calculator: 100
Did U findout why?
Thank you so much for teaching me ive always wanted to learn code. You make it super easy for people like me to code with C#
Very detail tutoring. Thanks. I was on Udemy, gave a kick start and all, but wasn't as clear as this video is. Preciate ya!!!
youtube: 13 comments
me: *seeing only 4 comments*
it only shows the most relevant
you can change the filter tho
@@jvcmarc nope , you are wrong . the four comments that you saw had replies in them, just like this
im having much fun coding fanfictions with c#.
tysm i am learning so much from this series!! :) cant wait for the next 1's :)
I did it! I did the homework on my own. Took me 10 minutes. Thanks for teaching all this.
Those thumbnails are f*ck!ng sexy!!!
Who's watching this video when you already know C#?
nope
Tbh I don't understand why he is wasting his time with these C# tutorials when there are thousands of perfect tutorials already.
Unity is a different piece tho
@@beschbekifft He does lots of Unity vids and people ask him how to learn, so this series is somewhat of an intro to Unity if you will.
I am
@@beschbekifft I agree i'd prefer him doing more unity things instead, but maybe people prefer Brackeys way of teaching(or voice ??).
thank you really 4 these tutorials they are really helpful i have never learned that fast even i am wondering how i am learning that fast thank you Brackeys.
you know, i genuinely feel that because of your vids, i now have fallen in love with C#. thank you very much, Brackeys.
i'm learning so much from you...thank you for being awesome and continue to be awesome -Brackeys's Milanote
Challenge done in first try, thanks Brakeys!
This is by far the best beginner tutorial For c#. Highly recommend this.
Thanks! Your lesson was clear and easy to understand! :)
Its cool that he makes a Challenge for us at the end of the video i was really hyped when i got it working first try without looking you learn from it and its fun 😀
Thanks for making these videos, Most other tutorials are pretty old
I'm just going episode by episode and this is already teaching more than other videos I've watched.
Learned most of C++, moving to C# and honestly your a godsend. :)
WOW! When I watched others c# videos it was boring, a lot boring, and then I was depressed(not depressed but bored), so I return watching c#. Then this video was 4th so clicked and it was fun. Thanks for this awesome experience. Regards from Croatia.
I take a break from using sockets to parse the raw bytes of the RDP protocol and watch a video on how to declare variables.
... It's a great video!
Yay! Another episode! This is exactly what i wanted for the second episode nice! Now we can make an interactive story, thanks.
This is a good breakdown amd made me understand in a much bigger picture.
Thanks for making this video it helped me a lot,I hope you the best.
The challenge you gave us in the end i did it exactly like you and im proud tbh
This dude is the ONLY good teacher ive seen all his videos make sense and are so so so so so helpful
I just finished my homework and so happy 😊 I'm loving it😊
I forgot () when adding numbers I was so confused for a second lol thanks for the videos they've been great so far 🙌
I’m subbing. Tomorrow or Friday I will binge watch your entire channel
Thank you brackey. This is really helping me.
Brackeys is easily without a doubt the most educational and easiest channel to learn coding from
As someone who is gonna read computer science next year this really helps a lot thank you for the awesome vids
2:10 Fundamental types would be value types and reference types. You are refering to types you most commonly use :) We also have object, decimal, char, byte and so on.
3:40 var inferres the type from the right side of the assignment. Also I recommend to use var, except for built in types because it can cause ambiguity. This is commonly accepted too.
Learning more in this series, than with 70+ hours in a college course smh.
Keep up the amazing tutorials! Hoping to become a game developer myself :)
These tutorials are very helpful thanks!
Thank you for doing this Series! :D
best programming mentor out there keep uploading like this😀😀😀
I really enjoy the challenges at the end.
I like the tasks at the end :D Nice Vid btw. helped me a lot ty