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
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
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?
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).
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?/
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();
}
}
}
Thank you, Sir!
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.");
}
@@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.");
}
The comparison to variables made this so much easier to understand. Thank you for simplifying this so much.
Bro code is an absolute legend bro. Explaining stuff way better than my profs in college.
🐐 makes its so much easier, especially explaining how it holds multiple values
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
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
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?
Bro my dad forces me to learn c# and you made it so simple to learn.
The late night coding sessions is what I live for
Ahh, I love the bass sound when you are typing! ASMR Coding!
my brain has blowed up lol
That means it's working
Thanks this made everything click
whats the difference between:
string[] arr = {"foo", "bar"};
string[] arr = new string[2];
arr[1] = "foo";
arr[2] = "bar";
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).
Great vid!🎉
top
Thank you ❤
thank u man
Thanks for the video Bro.
SOS GOD FLACO
How long did it take you to be the amazing at coding ?
I got an exam tomorrow thanks dude hahah
good luck
did you pass
done
Thanks Bro!
noice
how can i to create array with unknown size ?
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?/
for algorithm!
So there is no Array in the stack in C#. Is everything in a heap?
lesson check😇