❔ How to get to one of the arrays in a multidimensional array?
For instance, in:
How do I get to just the part?
13 Replies
so you want to get a row
yeah
it doesnt look like theres a built in way to do that
yeah you can't do that with MD arrays directly
you'd have to iterate through it manually
using methods like GetLowerBound/GetUpperBound
passing the corresponding dimension
because it's not an array of arrays
it's a truly multidimensional array
So do I have to double loop it and put array4[0,j] into another array?
you can do this directly with an array of arrays (aka jagged arrays)
int[][]
oh thanks
MD arrays are really awkward to use much of the time
they're a neat idea, but don't work that well in practice
No they just have a bad API
Henkypenky#4865
REPL Result: Failure
Exception: CompilationErrorException
Compile: 1456.056ms | Execution: 0.000ms | React with ❌ to remove this embed.
well it doesn't work here
Henkypenky#4865
REPL Result: Success
Console Output
Compile: 1298.440ms | Execution: 80.430ms | React with ❌ to remove this embed.
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.