❔ How can i reference a row in a 2D array?
I have a 6x8 2D array and i want to reference a row inside that 2D array.
16 Replies
for example:
how can i just get
2nd row
There is no built-in way to do this, although you could write a pretty simple method for it.
like?
reference a row not copy it right?
i want to make a 1D array from a row in a 2D array
after u make that 1D array, would modifying it affect the data in the 2D array too?
no
just want to make a copy of it basically
TheRanger#3357
REPL Result: Success
Console Output
Compile: 648.994ms | Execution: 112.015ms | React with ❌ to remove this embed.
well thats the 3rd row just change the index to what you need
im getting 2 errors when i copy and paste that
ah no u need to define the extension method in a static class
a method can only be placed inside a class, it cannot be placed outside the class
okay that works thanks
how would i make so it be able to increment through each row so it prints each row
nvm i did it
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.