The DataTable has a method called ImportRow(), There is also a method unders the rows called Add(). So what’s the difference between these methods?
dataTable.Rows.Add(newRow);
vs
dataTable.ImportRow(newRow);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ImportRow is useful if you’re importing a row from another table and you need to preserve all because you’re planning to use a DataAdapter