1
In a 3-column datagridview I need to scan all n rows and save them all in an array (or any collection) where each index contains the information for each datagrid row. Something like:
meArray[line1, Linha2, line3, line4,...]
Where each row is stored in another array:
linha1[cellulaColumn 0, cellulaColumn 1, cellulaColumn 2]
Is there any way to do that?
Yes, this is called multidimensional array, although it seems from the text you want Jagged array, is there a problem? If that’s all it is, I think it’s duplicate, if it’s more than that, it’s not clear that you need to improve the question. It can reopen if the question is different, but it would need to improve a lot with a specific problem.
– Maniero
What you asked for (array array), as @bigown said, is Jagged Arrays. But for tables the multidimensional array is usually better, because in principle a table is a single mass of data distributed in two axes. See the difference in the given question.
– Bacco
Right! Thanks, bigown and Bacco. Bacco, but an array array in my case would be easier to manipulate later.
– Vinícius
@Vinicius really specifics only depend on his real case. I understand that if you are going to retrieve the line to send separately for some other method or function, Jagged can be interesting, despite the slightly higher cost (which is negligible if it is not a gigantic volume of data).
– Bacco
@Bacco, yes! There will be a maximum of 10 lines. Thank you very much!!!
– Vinícius