I have following DataTable (dataTable)
**ColumnName** : **Data**
IDS : System.String
QTY : System.Int32
DOS System.DateTime
and following dictionary
Dictionary<string,Type> dict=new Dictionary<string, Type>();
dict["ID"]=typeof(string);
dict["QTY"]=typeof(Int32);
dict["DOS"]=typeof(DateTime);
Using following method for validating data of dataTable
public void ValidateData(Dictionary<string, Type> dict, DataTable dataTable)
{
foreach (DataRow row in dataTable.Rows)
{
// validate data here
}
}
What is best/efficient way to validate data here.
Thanks.