How to Program in C# - Arrays (E05)
ฝัง
- เผยแพร่เมื่อ 6 ก.ย. 2024
- Let's learn how to make lists and arrays in C#!
► Download Core for free at: bit.ly/Core-Br...
► D&D Design-A-Dungeon Contest: dndcontest.cor...
● Watch the previous C# tutorial: • How to Program in C# -...
● My Solution to the Challenge: bit.ly/3kjTbaV
····················································································
❤️ Donate: www.paypal.com...
► 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...
····················································································
♪ "ES_Dress Code_Black - oomiee" by Epidemic Sound
Brackeys: adds miracles to shopping list
2020: sorry those are out of stock
@Voltage miracles are out of stock too. 🤣🤣lol
Back in stock
I've seen many tutorials teaching that simple knowledge ( even in my native language) but you're the best. Your simplicity, your humor, your voice, you're amazing. You have talent for that. Don't stop doing this :-)
2 month later he stoped doing this :(
@@aLi112 uff was about to say that
siema polska xd
@@aLi112 that's hard for him
@@kaktus9607 siema
brackeys makes me feel like the sexiest person alive when i manage to do his challenges correctly
w o w. t h i s c o m p l m e n t i s w e i r d . C a n t e v e n s p e l l .
True
True
Specially when it's immediately working after your first try
yeah girls love people that sit at a desk all day and make programs.
the moment when u write something that u invented and that works, that feeling
Brackeys: Is making tutorial on coding in Unity
Also Brackeys: "This video is sponsored by different game-creation platform that requires no code..."
it's on visual studio code...
damn, the sponsors are idiots.
@@Noah-me2fm His channel is based on unity. Unity uses C#
No, they’re geniuses
yeah wrong choice isn't it? my bro quit the course and went to core instead.
Take a shot everytime Asbjørn says "awesome."
Just started programming through a university course and your lessons have helped me way more than any of the material provided during the course. You make it fun and understandable, so thank you very much!!
iv started self teaching using brackeys videos good luck!
You started programming a year ago. Can you give me a brief update on your current progress and how you're doing?
@@ashrafbarbour9048 yeah, i just started coding yesterday, and i want to know how far someone has gone in a year.
For the "homework" you said to do at the end, adding a number before the names is also a cool way to show how basic maths (Pemdas/Bodmas) works in methods. I added to the last Console.WriteLine a "i + 1" so that the names display with a number before the name i.e..... "1. Philip, 2. Brackeys" etc. instead of just "Philip, Brackeys"
this is genuinely a really good tutorial series that actually helped me and taught me basics in c#, i hope it continues for a long time
lol brackeys leaves youtube as you say this.
pro timing
He should't have stopped creating content, we need more of his tutorials! He is a good Lad!
Brackeys: uploads a video about Arrays
Me: Hurra.....I mean....hARRAY!!
(Also me: That was really bad XD)
Sans the Skel- *COMIC* wants to know your location
Your gonna be a dad one day
Thank you for these! We really do appreciate this series. Keep going!
:(
@@zeux6634 yeah... i seen it too. :(
Did it not finish? It's unlike him to just quit before a series is done
@@solarsunne4950 this was his last tuto :((
@@m9henri I know that now. Odd of him to leave before finishing it
😥 Brackeys is my most favourite youtube channel ever. I was going to take photo with you in brackeys studio some day. Good bye man! You really hit my heart as a teacher.
Did something happen to him? I just discovered this channel and the thought that something did already is making me sad!...
@@eliabrowning3628 In fact, he is fine and, I hope, doing well, but he quit TH-cam in order to make a change and do something else in his life(at least thats what he said in his last video) , moving to something else. Yeah that was really sad.
17 minute video took me 17 hours to understand
I'm in college now trying to learn c#. You explain everything better then my teachers. Thank you.
last time I looked into programming arrays scared me. That was years ago. You have simplified it and I'm more confident I can move on and tackle other things now. Thank you!
Never thought I’d be able to code, these videos have proved I definitely can, I just needed a good teacher. Thank you!
thats what i was thinking. I have a friend who coeds (in java) and i would look at his work and just be confused, but now i kinda know what im doing in c# which is not where i tohught id be... ever.
Finally another programming tutorial
First programming tutorial process that has actually helped me learn how to program :)
I took a couple days after finishing this video and then came back and decided, before moving onto the next video, to try the homework section after a two day break. I am confused but pleased to say I managed to make it work and honestly there are few feelings as great as taking a chance, problem solving then coming up with your own, functional, piece of code that does exactly what was asked of you. I also like how the homework sections so far have done a great job of drawing reference from the things that we learnt before them whilst also having an element of trickery to them that encourages you to try and fail and then come up with solutions and succeed. I wonder how many people wrote the exact same thing as me and how much room there is for flexibility in the script. Brackeys is the goat and these videos are amazing 🔥
Did the challenge as a list, realized that the sort syntax is different for a list than what is shown for an array and needed to research it myself... 10/10 would do again
I feel like there was a missed opportunity to touch on the topic of array out of bound errors when you put in i < 10 and had an array with length 4.
Same
brackeys is a busy man, he probably forgot
1 like = literally fucking nothing.
Hi, could you explain this to me please? I have tried using a program called SharpOcarina for N64 modding, but it always tells me "index is outside the bounds of the array" and I have no idea what the ͏f͏u͏c͏k that means. Thanks
@@yourmum69_420
In short, you have a list of say, 10 objects, and you try to access the 11th, or 15th, or 100th object - which is outside the bounds of the array, and does not exist.
@@yourmum69_420 Thats when the program is trying to access something that isn't in the array. If your array has 5 things and you tell your program to access the 6th or 10th item, it'll give you an out of bounds error because there are no 6th or 10th items in that array
It's strange that how the best tutorials on youtube is so underrated.
Hey brackeys, loving the content and can't wait to see the winners of the game jam! I was just wondering if you could do a video touching on character selection in a multiplayer game as I cannot seem to find a video on it anywhere. Cheers, keep up the great work!!
Some more context might be welcome for this... how much of the multiplayer game is already set up? Would he be building it from scratch? Then that will require an entire series just to get to the point of even having a character selection screen. If it's just showing the point of the character selection itself, then it's using UI displays and click events like he's shown in previous videos to allocate your selection to whatever object you're using to track each player's data for a game round (if you don't know what I mean by that, then this is what I mean when I say it would require an entire series cause there's a lot of background foundation that needs built first). So it might be a good idea to give more context so he can get a better feel of scope you have in mind when asking this question.
I have set up two basic characters and would like for players to be able to choose between either of them once I enter to game. Of course I will be setting up more characters but right now I'm stuck at the character selection. Since Brackeys has already made a series on how to make an online fps game, I think entire character set ups are unnecessary and would just like to learn how to get a character select screen working with two minimalistic characters
@@poresrage5053 Why not just create a character class, which contains a mesh and a texture, then apply them to your player whenever it's selected
@EternalClickbait I'm planning on adding special abilities to each players so it's not just a question of simply replacing character models
@@poresrage5053
I know how to do it but cannot explain easily in TH-cam. Better reply to discord.
As you'll get late if you wait for video
Never thought I’d have to code my shopping list...
i'll be your first reply. Hi
@@creatingcrates5870 hi 👋
Yes! Managed to complete the challenge. Had to look at a still image of the arrays code, but still managed to combine previous lessons into a working solution which allows any number to be input by the ser, then the corresponding names, and it then spits out the names in alphabetical order.
Phew. I LIKE this!!
Wow! I like the way you are explaining everything, I have watched alot of videos about array but no one is explaining everything the way you are doing it.
Another awesome video! Thanks you all!
This is what we were waiting for 2 weeks
I saw a little detail at 0:16
You have watched interstellar too.
This is my favorite movie. I respect you for liking it too. It's so underrated. It change my way of thinking lmao...
Pls no hate from the people that dont care XD
That movie is so well crafted
how is that detail? .d
How does this have only 80 thousand views? This deserves more
In beginning there were so many views. Soon many gave up and now there are only 80k people left.
Today's motivation
17/08/2020
Monday
"I FEAR NOT THE MAN WHO HAS PRACTICED 10000 KICKS ONCE, BUT I FEAR THE MAN
WHO HAS PRACTICED ONE KICK 10000 TIMES."
-Bruce lee
hmmmmmmmmmmmmmm
@@PhiloSafarMusic hlo dude
Best Teacher on youtube
This has helped me so much! Thanks for your help!
Can you please do Classes/Method? I have watched so many videos about C# and yours has been the easiest to follow. Thank you!
I need help with this twist: Instead of entering the student number first, what if we enter the student names first and it will automatically count the student number for us?
Very well done, finally learning C# now. Though since I'm already familiar with most concepts i watch at 1.5x. Keep it up!
I start waching yo since 2 hrs. The 1st vid was youer firat learning c# and you make a new vidio sincw 1hr . I am lucky😁
????
I have done the task before you give it. I feel happy now. _**_
Thank you Brackeys for your advices and videos
As a 13 yr old kid i am learning so much from you and I am actually trying to develop a small 2D game by myself
Maybe someday I will be an indie game developer
Thank you so much for learning me and for you free lessons!
Peace!
Console.WriteLine("Keep it on ");
mama am gasit si Romani
did you do it my brother
This was a really nice and quick comprehensive way of explaining arrays, very very VERY good video.
Thank god for you bro! You’ve taught me more in this video than the 2 hours worth of lessons my college has provided
It might be important to mention that Sorting Algorithms can mess up at a certain point, so instead of using the default .Sort(), it might be cool to explain how to write your very own sorting algorithms, which can then be modified, whether you want really simple Code to write (Shell-/Bubblesort), a high stability (Merge Sort f.e.), low memory usage or extreme precise results. This is a rather complicated topic, but maybe it might be an interesting topic for a future episode.
Welp :/
@@brandoncullen4189 yeah i guess there won't be a future episode tho :(
I love this series! I know most of what you’re teaching already, but it’s good to reinforce already known knowledge. I have my C# class (college classes) starting this Thursday and I’m pretty excited about it! 😁
15:50 I feel like Dwayne and Shrek would always get into arguments...
More than 1000 views in 18 minutes? Wow. Thanks Brackeys for yet another awesome video!
This is the most clean explanation about array.
Thanks for teaching the topic ARRAY!
Good luck covering all of C# and programming with a video per week XD
Its not meant for all of it. Its meant for the basics.
Beautifully described and executed Brackeys. You're the best! 🤓👍
I'm an experienced developer and I know every single thing in the video but I still watched this just because it's brackeys xD It's always a pleasure to watch your videos. Keep it up!
Major game developer you tuber are from nordic countries.
Brackeys from Denmark
Sykoo from Sweden
Dani from Norway.
HECK YEA DANI
I love storing my dreams in a fridge!
Midnight snacks
Well, then, your dreams will just freeze.😂
Amazing, quick and straight to the point explanation. Loved all about it. Seriously, you are awesome! Thank you!
yesssssss im glad im early its 10:22pm for me lol ive been waiting for this thanks for making tutorials as i want to get into game development and you and dani are my inspirations
Ever heard of Sebastian Lague?
@@thedude4039 no. who is he ?
@@thedude4039 oh, just searched him. of course i know who he is
the challenges are def my fav part of the videos
My solution(pretty simple ngl but works):
Console.WriteLine("How many students are in your class?");
int Stunum = Convert.ToInt32(Console.ReadLine());
String[] Students = new String[Stunum];
Console.WriteLine("Type in your Students names");
for (int i = 0; i < Students.Length; i++)
{
Students[i] = Console.ReadLine();
}
Console.WriteLine("Here they are alphabetically");
Array.Sort(Students);
for (int i = 0; i < Students.Length; i++)
{
Console.WriteLine(Students[i]);
}
Console.ReadKey();
This is really the best tutorials ever! Thanks Brackeys! Keep up the good work
I learnt more from this video then my 2hr class lol.
Ive made $30,000 on my game so far. Thanks for all your help
Finally brackeys uploading a video
First time visiting your channel and I gotta say, you are a breath of coronavirus free air!!! Thank you for using TH-cam for something positive and rewarding. The way you explain things makes people like me feel super smart lol. Get used to see me because I'll be checking your videos. Already a subscriber with all notifications coming my way. (MY GOAL: Making a game by X-MAS) So.... Let's do this!!!!
10:22 - Disadvantages of using Arrays...
What if we put things like this?
Letting user to decide how long the array will be?
Console.Write("How many students are in your class?: ");
int input = Convert.ToInt32(Console.ReadLine());
string[] student = new string[input];
...
As I am super new in C# this may be related to the Schrodinger's cat. :D
May be good or it is very bad.
You will know the moment you open this box. ;)
Great tutorial! Thanks for keeping this series alive!
some heroes dont wear capes, I litterally have an exam tomorrow with this exact rubric
thanks brackey for C# videos but i have one request for can you make another videos on "bolt" also?
please...
how am i this early?
realization i spend to much time procrastinating
Absolutely sir, Same problem
Me too
Glad you exist man this is so cool
I love combining this series with how to make a video game series. Keep up the good work :)
thanks too much as a new to programming it was so confusing but when i saw your vids about it it made everything simple and easy.
I'm really new at coding and i love your content. Hoping to learn how to code and start making my own games.
You helped me understand this so much better! Thank you
Better than my professor. Thanks 🙏
I hope you cover Lists. In practice I rarely use arrays, I use Lists the vast majority of the time. However, arrays are foundational to understanding programming in general and C# in particular. So it’s really good you are covering arrays.
The most impressive thing to me is how the editor shaded Shrek's whole body green. They could have just added his head and left it at that, but instead they decided to go the extra mile. Bravo.
THANK YOU IVE BEEN SO CONFUSED
Amazing, I love the way you explain. I watched Array Tutorials from other channels too but in this video I got lots of new idea. Thank you ❤
this has been REALLY fun for now..
still learning thank you Brackeys am little bit comfort with list and array after watching this video
Oh may god i love your lesssons.
As much as I love these tutorials, I don't like deleting my hard work from the last episode challenge :( (ik I could make a new project every time, but that's to hard lol)
One thing you could do is make it a comment by putting a '/*' at the beginning of it and a '*/' at the end (ignore apostrophe). That'll nullify that bit of code, while you work on another. There COULD be an easier way, but I'm still pretty fresh.
those are the only lessons that I genuinely like.
I am shocked that quality video such as these have only a few thousands views
you can also size an array
example
int size= int.Parse(Console.ReadLine());
int[]array=[size];
Hey man, love your videos. I have an unrelated request:
I am trying to learn how to do character animations in Unity. I would really appreciate it if you could consider making a tutorial should you find the time. Thanks!
Great tutorial, thanks for all this free quality information, Brackeys! Now then, ONWARD, to the next one!
Here is my soluion to the homwork with notes :D
.
.
.
.
.
.
//initial question
Console.WriteLine("How many students do you have?: ");
//records user input as an integer
int studentCount = Convert.ToInt32(Console.ReadLine());
//creates an array, and the index amount of the array.
//entering 4 previously, will create an array of 4 strings.
string[] students = new string[studentCount];
//asking user for input, using a variable in the text.
Console.WriteLine("Enter the names of your " + studentCount + " students.");
//loop to record the input of the user. user has 4 lines available.
for (int index = 0; index < studentCount; index++)
{
students[index] = Console.ReadLine();
}
//sorts the user input to numerical/alphabetical order.
Array.Sort(students);
//writes a line prior to printing results
Console.WriteLine("Here are your students in alphabetical order");
//prints names of students entered in alphabetical order
for (int index= 0; index < studentCount; index++)
{
Console.WriteLine(students[index]);
}
//wait before closing
Console.ReadKey();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("HOW MANY STUDENTS ARE IN YOUR CLASS: ");
int noStu = Convert.ToInt32(Console.ReadLine());
string[] sudents = new string[noStu];
Console.WriteLine("ENTER STUDENTS NAME: ");
for(int i = 0; i
Someone: Best Student doesn't exist
Me: 15:58
@Noel Jasik, I don't get it
@@nooptiui Shrek is the best student
Really nicely done!
Dude the explaining everything is awsome !!
Great video! Explained very simple and easy to understand.
thx i have been ableto understand this in a hour bc of u thx so much
Thanks brackeys! This is very useful!
It’s great that you’re making these great beginner scripting videos that will bring thousands of new people into the programming world, but there’s a problem. There’s already such a high resource density when it comes to beginner scripting tutorials, but the amount of good content for the more advanced topics, which are much more difficult, confusing and in need of an awesome channel like yours, that makes learning these concepts much easier, to teach us those difficult things is much lower, and so it might be better if you focused on teaching the more difficult topics instead of easier ones, because those topics are in more desperate need to be taught than these basic tutorials that everyone makes.
"favourites" vs "favorites" in one video
yeeeeeesh
It's definitely "colour" and "favourites"
It just looks more appealing
Brackeys I fucking love you mate. This week I'm gonna have a test from arrays in c# and you explained them better than my teacher, thanks again!!
You told how to use tNice tutorials program like I was 6 and it was perfect
The best teacher that i ever had❤
Finally, got the video!!! Was waiting since years...
But, Thanks man.
Good Job Brackeys.
Who else here knows all of these but still watching? ✋
No harm in reinforcing information 👌
Me ▼・ᴥ・▼
@@childishlandino3679 yessir 👍
yes its fun. My favourite part is the creative thumbnails
Me