Convert data table to array of data rows

I want to extract certain rows from a given column in my datatable and store them as array of data rows. Select is not suitable option as it requires some predefined values thus my question is what is the best approach to extract array of data rows from a datable?

If e.g. I have a data table I have a column and I want rows nr. 5,6,7 from one specific column as array of data rows. How to achieve such a result?

Try this

Assume row no is 5 and column no is 1

arr[0] = DataTable.Rows(5).Item(1).ToString

Do you have a criteria for the row values 5,6,7? like value = New?

1 Like

No I do not want to have any criteria I just one to take row number 5,6,7 with no criteria at all

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.