16: Multidimensional Arrays in C# | Arrays in C# | C# Tutorial For Beginners | C Sharp Tutorial

Поділитися
Вставка
  • Опубліковано 6 жов 2024

КОМЕНТАРІ • 61

  • @jpedfonseca
    @jpedfonseca 3 роки тому +14

    It seems that you confuse columns and rows.
    Columns are in vertical and rows are lean down. Columns are the second number in the array declaration and the rows are the first number.

    • @Dani_Krossing
      @Dani_Krossing  3 роки тому +6

      Hehe yes thank you 🙂 My mind was occupied with looking at my lesson guide on my 2nd monitor, so I confused the two during the recording hehe 😅 Re-watching the video, I can see that I did use "column" and "rows" correctly at the start, and then around 2:05 I started screwing up my pronunciation saying "multidimensional", which most likely threw me off when explaining row 14.

  • @Redmile2006
    @Redmile2006 2 роки тому +3

    Just a heads up, when you create an array with an initializer (as in, you give it some data right away), you don't need to specify the array size. Eg.
    var namesList = new string[,] {
    {"Daniel", "28"},
    {"John", "34"},
    ...
    }
    You don't need to say new string[4,2], just string[,] is ok. Same with single dimension arrays.
    Also, you can create jagged arrays with an initializer like this:
    var jagged = new int[][]
    {
    new int[] {1, 2, 3},
    new int[] {1, 2},
    new int[] {1, 2, 3, 4, 5}
    };

  • @iBoatLaunch
    @iBoatLaunch 3 роки тому +5

    You need to pull this video bro, confusing the hell out of people by mixing up Columns with Rows.

  • @blaaablooo5233
    @blaaablooo5233 4 роки тому +49

    wow i didn't know Elon musk does tutorials on UA-cam

  • @aceplusplusplus7652
    @aceplusplusplus7652 3 роки тому +3

    Thank you for this- I hadn't known about jagged arrays previous to watching this video! May come in handy! :)

  • @hasnainfareed8555
    @hasnainfareed8555 4 роки тому +18

    Nice Tutorial, but at many places you called columns rows and vice versa.

    • @izeckx
      @izeckx 4 роки тому +1

      I noticed that and it confused the hell out of me.

    • @Ehb7777
      @Ehb7777 4 роки тому +3

      Yep he called column when is a row

    • @khantv3041
      @khantv3041 3 роки тому

      I immediately noticed it but realized it quickly is just calling the rows as columns...

  • @kaembechisenga4677
    @kaembechisenga4677 5 років тому +9

    Your tutorials are super cool.
    Are we done with the PHP Course?

    • @zeshan740
      @zeshan740 5 років тому +1

      mmtuts PHP course: ua-cam.com/video/qVU3V0A05k8/v-deo.html

  • @Satish_Kumar.
    @Satish_Kumar. 3 роки тому

    Please explain the applications of the topic as well.
    Can you create a video on how to create cascading drop-down..
    Your explanation and teaching is very nice

  • @wasabi_san
    @wasabi_san 3 роки тому +5

    You've confused rows with columns. Just remember that rows are horizontal and columns are vertical. Pretty obvious, I know.
    Also note that each row inside a 2D array is not called a dimension as you kept referring to the next row as the "next dimension". Otherwise a matrix with 10 rows would be called a 10D array, which is not true. Using the correct terminology is important in an instructional video, especially for viewers that are beginners.

  • @calibr0636
    @calibr0636 5 років тому +1

    damn, ive heard of 2d arrays but I didn't know you could make multidimensional arrays

  • @tinnyuj4141
    @tinnyuj4141 4 роки тому

    thankyou for your tutorial i learn a LOT

  • @lusingarib
    @lusingarib 5 років тому +2

    You are amazing ... but we need also Java please

  • @cavalocivilizado2099
    @cavalocivilizado2099 4 роки тому

    OMG U SAVED MY LIFE THX

  • @krissaestilloremendoza1136
    @krissaestilloremendoza1136 2 роки тому

    Write a program that stores students’ information (e.g. id number first name, last name, middle name, course, year, email address and mobile number) in a multi-dimensional array. Initially put 200 random entries in your array (automate it). Also allow the user to search, insert and delete something into the array.

  • @ragoayoub3016
    @ragoayoub3016 5 років тому +1

    Great video, i do have a question however, when counting dimensions, columns ...etc., why do we start at zero?

    • @zeeksthegoblin7564
      @zeeksthegoblin7564 5 років тому +5

      I usually think of it in a certain way, it is less confusing in a programming way to start at zero. If you start at one, does it mean you skip one and go to two or is one the start? With zero, you know it is the first position. That is just the way I think of it.

  • @flyingbirds4235
    @flyingbirds4235 4 роки тому

    Great tutorial.

  • @nithinv8874
    @nithinv8874 4 роки тому

    MMMMMMMMulMultidimensional Arrays. Cool one dude keep goin..

  • @unkept1113
    @unkept1113 5 років тому

    nice teaching

  • @StormyHotwolf88
    @StormyHotwolf88 2 роки тому

    2:36 OK, I'm not crazy. I think you meant to say 4 rows, 2 columns.

  • @mrpddnos
    @mrpddnos 5 років тому +1

    I never really liked arrays in C# because when you define the array you need to know how many items you will be adding to it. I rather use generic Lists where I don’t need to know how much data I will be adding.

    • @Qyful
      @Qyful 4 роки тому +1

      You don't actually need to define how many items. Try string[] test = { "test" };

    • @gibonov6623
      @gibonov6623 4 роки тому +1

      or you can set it to 0 and then do Array.Resize later when you input data

  • @gmar_tade_Tube
    @gmar_tade_Tube 4 роки тому

    i real thank u it help me

  • @42svb58
    @42svb58 3 роки тому

    Subbed!

  • @ThemisTheotokatos
    @ThemisTheotokatos 3 роки тому +1

    how do you loop through them?

  • @jaiylonbabb7548
    @jaiylonbabb7548 2 роки тому

    What if the size of the jacket array's rows are unknown? Basically have it dynamic what's the syntax for that?

    • @Dani_Krossing
      @Dani_Krossing  2 роки тому +1

      If you want an array that has a unknown number of indexes, then you use a List instead. 🙂

  • @williamsandyinc5682
    @williamsandyinc5682 2 роки тому

    I think not to get confused 4 by 2 means 4 rows each with 2 columns

  • @CartoonzWorld-qk6kf
    @CartoonzWorld-qk6kf 10 місяців тому

    1:00 you do a mistake between row and column

  • @chinomsomaduagwu8415
    @chinomsomaduagwu8415 4 роки тому +1

    just call it MDA brother, i feel your struggle.

  • @king_israel6
    @king_israel6 5 років тому

    Hi Mr Daniel I've watched your videos and they're superb thanks so much for everything but I have a problem with one. The comments video...when I click submit, the comments don't go into the database. Please help😭🙏

  • @spidernh
    @spidernh 3 роки тому

    how do I use this as an input parameter? I'm making a level editor with a text file being the level tiles, so I need to create the array inside of a method because I don't know the size of the level before finding it. I ended up creating the array inside of a method but I now need to pass it onto another method, how would I do this?
    TL;DR: how do you make a method with a nested array like this as an input parameter?

  • @mii3039
    @mii3039 3 роки тому

    can you do windows form version?

  • @Lukas-qd7fy
    @Lukas-qd7fy 5 років тому +2

    First person to say first!

  • @vigneshthedubsmasher1213
    @vigneshthedubsmasher1213 2 роки тому

    If i learn this c# .can i use it in unity for game devolopment

  • @wwg681
    @wwg681 4 роки тому

    If I change var to string why doesn't it work? :P

  • @hhcdghjjgsdrt235
    @hhcdghjjgsdrt235 2 роки тому

    Elon vai 🤘

  • @mymycat187
    @mymycat187 2 роки тому

    you seem like wrong about col and row defines

    • @Dani_Krossing
      @Dani_Krossing  2 роки тому

      Yes I did accidentally switch them around once in the video 🙂

  • @Danyu91
    @Danyu91 4 роки тому

    homecome we dont have to count the length from 0?
    years of academy training wasted

  • @user4gent416
    @user4gent416 3 роки тому

    Its not Multidimensional. Its multi Ś H 1 Ţ

  • @happydragneel52
    @happydragneel52 3 роки тому

    si syarp

  • @shaunhunterit342
    @shaunhunterit342 2 роки тому

    You sound like you've just learn this yourself

    • @Dani_Krossing
      @Dani_Krossing  2 роки тому +1

      Alright…? 😅 If you have nothing relevant or positive to say, it’s better not to say anything.

  • @MarrianStJames
    @MarrianStJames 3 роки тому

    you know it's all great , but only if you were capable of speaking english, it would've been even better