forum

Home / DeveloperSection / Forums / How can I validate if the column exist in a DataRow object?

How can I validate if the column exist in a DataRow object?

Anonymous User 2194 02-Sep-2014
private int EmploymentID { get; set; }
private void MapFields(DataRow row)
{
        if(row.HasError)
          EmploymentID = Convert.ToInt32(row["EmploymentID"].ToString());
}

The code shows that it validates if the DataRow object has error on its row but I want to validate if it ever exist. Is there an approach for the code rather using HasError method of DataRow?


Updated on 03-Sep-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By