How can I search rows in a datatable for a row with Col1="MyValue"
I'm thinking something like
Assert.IsTrue(dataSet.Tables[0].Rows.
FindAll(x => x.Col1 == "MyValue" ).Count == 1);
But of course that doesn't work!
How can I search rows in a datatable for a row with Col1="MyValue"
I'm thinking something like
Assert.IsTrue(dataSet.Tables[0].Rows.
FindAll(x => x.Col1 == "MyValue" ).Count == 1);
But of course that doesn't work!
You can try this:
var b=datatable.AsEnumerable.where(p=> p.Field<string>
("column_name")=="desire_value").CopyToDataTable()