Answers for "how to delete data from table in sql c#"

1

c# remove rows from datatable

for(int i = dtPerson.Rows.Count-1; i >= 0; i--)
{
    DataRow dr = dtPerson.Rows[i];
    if (dr["name"] == "Joe")
        dr.Delete();
}
dtPerson.AcceptChanges();
Posted by: Guest on August-25-2020

Code answers related to "how to delete data from table in sql c#"

Browse Popular Code Answers by Language