C# arrays 🚗

  Рет қаралды 71,294

Bro Code

Bro Code

Күн бұрын

Пікірлер: 39
@BroCodez
@BroCodez 3 жыл бұрын
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(); } } }
@officialmoai3107
@officialmoai3107 11 ай бұрын
Thank you, Sir!
@BroCodeFan
@BroCodeFan 7 ай бұрын
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."); }
@BroCodeFan
@BroCodeFan 7 ай бұрын
@@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."); }
@takundasm
@takundasm 3 жыл бұрын
The comparison to variables made this so much easier to understand. Thank you for simplifying this so much.
@MoodyHL
@MoodyHL Жыл бұрын
Bro code is an absolute legend bro. Explaining stuff way better than my profs in college.
@javidwaldron8377
@javidwaldron8377 11 ай бұрын
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.hayden
@abraham.hayden 2 ай бұрын
🐐 makes its so much easier, especially explaining how it holds multiple values
@FeenickzVR
@FeenickzVR 11 ай бұрын
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
@siddharthjain6629
@siddharthjain6629 14 күн бұрын
You have created an amazing content bro
@sithijadealwis
@sithijadealwis Жыл бұрын
Ahh, I love the bass sound when you are typing! ASMR Coding!
@christopherdevoto7291
@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?
@elliotradley4370
@elliotradley4370 2 жыл бұрын
The late night coding sessions is what I live for
@StarryAt
@StarryAt 21 күн бұрын
Nice!
@julox7938
@julox7938 2 жыл бұрын
SOS GOD FLACO
@repairstudio4940
@repairstudio4940 11 ай бұрын
Great vid!🎉
@BlackMan-c1x
@BlackMan-c1x 4 ай бұрын
Bro my dad forces me to learn c# and you made it so simple to learn.
@SoohNabis
@SoohNabis 2 жыл бұрын
my brain has blowed up lol
@BroCodez
@BroCodez 2 жыл бұрын
That means it's working
@spartanranger
@spartanranger 3 жыл бұрын
Thanks for the video Bro.
@MsKillaDJ
@MsKillaDJ Жыл бұрын
Thanks this made everything click
@zacksc2574
@zacksc2574 Жыл бұрын
How long did it take you to be the amazing at coding ?
@user-gk9fn8pu1f
@user-gk9fn8pu1f Жыл бұрын
top
@Ronnyxxedit
@Ronnyxxedit 11 ай бұрын
Thank you ❤
@samer_is_code_it_now
@samer_is_code_it_now Жыл бұрын
thank u man
@ryan7362
@ryan7362 2 жыл бұрын
I got an exam tomorrow thanks dude hahah
@BroCodez
@BroCodez 2 жыл бұрын
good luck
@matthewman1
@matthewman1 5 ай бұрын
did you pass
3 жыл бұрын
Thanks Bro!
@Tendity
@Tendity 3 ай бұрын
whats the difference between: string[] arr = {"foo", "bar"}; string[] arr = new string[2]; arr[1] = "foo"; arr[2] = "bar";
@011_mech_anithkesava.m.r2
@011_mech_anithkesava.m.r2 3 ай бұрын
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
@ahmedhassan5783 Жыл бұрын
done
@budderrar5751
@budderrar5751 2 жыл бұрын
noice
@AbdullahGameDev
@AbdullahGameDev Жыл бұрын
So there is no Array in the stack in C#. Is everything in a heap?
@AKLINA-m1o
@AKLINA-m1o 5 ай бұрын
how can i to create array with unknown size ?
@chinmayk2657
@chinmayk2657 3 ай бұрын
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?/
@simik4830
@simik4830 3 ай бұрын
for algorithm!
@whitedinamo
@whitedinamo 3 жыл бұрын
lesson check😇
C# foreach loop ➰
1:52
Bro Code
Рет қаралды 55 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
C# multidimensional arrays ⬜
5:06
Bro Code
Рет қаралды 53 М.
How to Program in C# - Arrays (E05)
17:01
Brackeys
Рет қаралды 452 М.
C# - Arrays
14:36
TutorialsPoint
Рет қаралды 116 М.
C# objects 🧍‍♂️
5:01
Bro Code
Рет қаралды 56 М.
Arrays | C# | Tutorial 11
8:53
Giraffe Academy
Рет қаралды 45 М.
The Dictionary Data Structure in C# in 10 Minutes or Less
10:20
IAmTimCorey
Рет қаралды 43 М.
Every single feature of C# in 10 minutes
9:50
Train To Code
Рет қаралды 172 М.
TOP 10 C# Array Methods (Beginner Tutorial)
15:47
Daniel Simionescu
Рет қаралды 11 М.
you will never ask about pointers again after watching this video
8:03
C# generics ⁉️
5:33
Bro Code
Рет қаралды 84 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН