Given a DataSet
with table name = table1 I have several rows. Of all the rows I want to select the index or indices of the one that contains the element with the name of element = element and value = valueA
With:
DataSet ds = new DataSet();
ds.Tables["tabla1"].Rows.count;
I get the total number of rows
With:
DataSet ds = new DataSet();
ds.Tables["tabla1"].Rows[2]["elemento"];
I get a value
I need to implement a method that gives value and its key="element" returns index 2 or indexes that match.
Is that how I do it so that I return the index of the element of the rows that is equal to valueA?
Is it possible to do it without for or foreach?