using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { // array = a variable that can store multiple values. fixed size //String[] cars = {"BMW", "Mustang", "Corvette"}; String[] cars = new string[3]; cars[0] = "Tesla"; cars[1] = "Mustang"; cars[2] = "Corvette"; for (int i = 0; i < cars.Length; i++) { Console.WriteLine(cars[i]); } Console.ReadKey(); } } }
@officialmoai310711 ай бұрын
Thank you, Sir!
@BroCodeFan7 ай бұрын
string[] themaRondes = { "Sport", "Cultuur", "Politiek" }; int aantalTeams = 4; string[] teamNamen = new string[aantalTeams]; int[,] scores = new int[aantalTeams, themaRondes.Length]; // Namen en scores invoeren for (int i = 0; i < aantalTeams; i++) { Console.Write($"Voer de naam in van team {i + 1}: "); teamNamen[i] = Console.ReadLine(); for (int j = 0; j < themaRondes.Length; j++) { Console.Write($"{teamNamen[i]}, {themaRondes[j]} score: "); scores[i, j] = int.Parse(Console.ReadLine()); } } // Winnaars per ronde bepalen for (int j = 0; j < themaRondes.Length; j++) { int hoogsteScore = -1; string winnaar = ""; for (int i = 0; i < aantalTeams; i++) { if (scores[i, j] > hoogsteScore) { hoogsteScore = scores[i, j]; winnaar = teamNamen[i]; } } Console.WriteLine($" Winnaar van de {themaRondes[j]} ronde is: {winnaar} met {hoogsteScore} punten."); }
@BroCodeFan7 ай бұрын
@@officialmoai3107 // Thema's en teams string[] themaRondes = { "Sport", "Cultuur", "Politiek" }; int aantalTeams = 4; string[] teamNamen = new string[aantalTeams]; int[,] scores = new int[aantalTeams, themaRondes.Length]; // Namen en scores invoeren for (int i = 0; i < aantalTeams; i++) { Console.Write($"Voer de naam in van team {i + 1}: "); teamNamen[i] = Console.ReadLine(); for (int j = 0; j < themaRondes.Length; j++) { Console.Write($"{teamNamen[i]}, {themaRondes[j]} score: "); scores[i, j] = int.Parse(Console.ReadLine()); } } // Winnaars per ronde bepalen for (int j = 0; j < themaRondes.Length; j++) { int hoogsteScore = -1; string winnaar = ""; for (int i = 0; i < aantalTeams; i++) { if (scores[i, j] > hoogsteScore) { hoogsteScore = scores[i, j]; winnaar = teamNamen[i]; } } Console.WriteLine($" Winnaar van de {themaRondes[j]} ronde is: {winnaar} met {hoogsteScore} punten."); }
@takundasm3 жыл бұрын
The comparison to variables made this so much easier to understand. Thank you for simplifying this so much.
@MoodyHL Жыл бұрын
Bro code is an absolute legend bro. Explaining stuff way better than my profs in college.
@javidwaldron837711 ай бұрын
Dont usually go out of my way to comment but you are a blessing man, taking a coding class for grad school and youre helping me feel like im not gonna fail. best easy to understand quick tutorials
@abraham.hayden2 ай бұрын
🐐 makes its so much easier, especially explaining how it holds multiple values
@FeenickzVR11 ай бұрын
I know a bit of java, but since Im wanting to become a game dev, these tutorials have been helping me learn a lot of the classes used in C# since I already know the syntax
@siddharthjain662914 күн бұрын
You have created an amazing content bro
@sithijadealwis Жыл бұрын
Ahh, I love the bass sound when you are typing! ASMR Coding!
@christopherdevoto7291 Жыл бұрын
Honestly, Thank you so much for this. You simplified this subject matter to a point where I can comprehend the need for an array. How could we support you; do you have a bootcamp or anyway I can donate to you?
@elliotradley43702 жыл бұрын
The late night coding sessions is what I live for
@StarryAt21 күн бұрын
Nice!
@julox79382 жыл бұрын
SOS GOD FLACO
@repairstudio494011 ай бұрын
Great vid!🎉
@BlackMan-c1x4 ай бұрын
Bro my dad forces me to learn c# and you made it so simple to learn.
@SoohNabis2 жыл бұрын
my brain has blowed up lol
@BroCodez2 жыл бұрын
That means it's working
@spartanranger3 жыл бұрын
Thanks for the video Bro.
@MsKillaDJ Жыл бұрын
Thanks this made everything click
@zacksc2574 Жыл бұрын
How long did it take you to be the amazing at coding ?
@user-gk9fn8pu1f Жыл бұрын
top
@Ronnyxxedit11 ай бұрын
Thank you ❤
@samer_is_code_it_now Жыл бұрын
thank u man
@ryan73622 жыл бұрын
I got an exam tomorrow thanks dude hahah
@BroCodez2 жыл бұрын
good luck
@matthewman15 ай бұрын
did you pass
3 жыл бұрын
Thanks Bro!
@Tendity3 ай бұрын
whats the difference between: string[] arr = {"foo", "bar"}; string[] arr = new string[2]; arr[1] = "foo"; arr[2] = "bar";
@011_mech_anithkesava.m.r23 ай бұрын
Num1: string[] arr={"foo" ,"bar"} -> which represents that you declare a array with string datatype and gives the array a values(Initialization) in the same line without set any total number of individual values that must be present inside the array. Num2: string[] arr=new string[2]; arr[1]="foo"; arr[2]="bar"; -> which represents that you declare a array with datatype string and set the number of individual string values must be present inside is 2 and declare the value for the array of index[1] ="foo" and index[2]="bar".(That must be index[0] and [1] because index starts from 0).
@ahmedhassan5783 Жыл бұрын
done
@budderrar57512 жыл бұрын
noice
@AbdullahGameDev Жыл бұрын
So there is no Array in the stack in C#. Is everything in a heap?
@AKLINA-m1o5 ай бұрын
how can i to create array with unknown size ?
@chinmayk26573 ай бұрын
what if user want to select random car and pass it in another class(program) exampl driver.findelement(By.Xpath("").sendkeys("cars"); can you please reply?/