 Hello guys Crypto Grounds here welcome back to another C sharp crash course video This is episode 12 today We're gonna be doing Jagged Arrays will also call nested array if you enjoyed this video make sure you leave a like Subscribe to my channel and turn on notifications and check out my other videos on my icon in the top corner Anyways, let's get on with it. So the Jagged Array is basically a nested array where you can have arrays inside an array Okay, so You declare it by having two of these Array brackets like that and McLaren them honestly works the same way You just do jagged equals new float Okay, so I'm gonna stop here. So now we want the size of this array, right? We want to put two unfortunately She sharp isn't very friendly with this. You can't define a size of All the rays. So let's say you want a two by three, right? That's kind of an issue is that you can't just put a number in here to define a two by three array Instead however, this is also a good thing is that we can have different sized arrays inside this array unlike Java So that's kind of cool So in here you have to define each one So in here you can just do a for loop which I'm not gonna do in here because I'm gonna do a video on that later on So we just do Jagged Zero is equal to a new float Um, let's say we want this to be a size three instead even we're gonna change it up and Jagged however, so remember all this stuff is gonna be zero. So it'll look like this Zero zero zero. So it's just an empty three array indexes zero one two and for our Second one our second index. It'll be a new since I'm gonna put floats in here I'm not gonna write down float. It's gonna put down the Array here and define some pre-defined stuff. So we're gonna do 1.07 f for float Yes, f is floats without the f. It's a double And then we're gonna put 2.04 F for a second like this. So now if we write out our array in a box So we have index zero It's a three It's a size three array We have zero index zero one two and here we have everything from that array, which is gonna be zero zero zero And now for a second one We expand this and now it's a size two array And in here we put our stuff in here 1.07 and 2.04 like this And also this is index one, okay So the access for example 1.07 we just do Jagged again, this is just the name. Okay Jagged at index zero. That's this right here. This is the first one and then here. No, actually, this is one, right? So this is one and then the second one is zero, okay, and this will be This will equal 1.07 Okay, if this was a one it would be 2.04 now if you try to this doesn't exist, right? you'll get a Out of bounds error indexes out of bounds, okay Now the difference between Java and C sharp is that you can't do this Okay, you'd have to put another variable in here because basically it's just a 3d array Java is like it's just always gonna be a square rectangle while in C sharp It's very handy. You could do it like this because maybe you don't need this right here, right? Anyways, I think that's it for this video Hope you guys enjoyed this one and this makes sense comment down below if you have any questions any suggestions Like the video if you enjoyed subscribe my channel and turn on notifications if you're new and miss thank you guys for watching