How about this ?
Dim AddressCells As DataGridViewCell() =
(From row As DataGridViewRow In dgv.Rows
From cell As DataGridViewCell In row.Cells
Select cell).ToArray()
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I do not want to address this way. Is there another way of LINQ?
And if there is no way with linq, with a function that obtains cell addresses row by row
Dim AddressCells As DataGridViewCell() = {dgv.Rows(0).Cells(0), dgv.Rows(0).Cells(1), dgv.Rows(0).Cells(2)}
need Array as...
How about this ?
Dim AddressCells As DataGridViewCell() =
(From row As DataGridViewRow In dgv.Rows
From cell As DataGridViewCell In row.Cells
Select cell).ToArray()