I have a datatable which is being filled with the data that is read via an excel sheet. This datatable has to be validated. It contains 34 columns of varying data types like char,datetime,string,int etc.
Conditions for validation ::
1.Of these 34,12 columns should not be null.
2. These 12 columns have fixed datatypes. (ex: col 1 must be char,col 3 must be string etc)
3. If each row passes the above two validations,the entire row should be added to a new datatable2.
4. If either 1 or 2 fails,that row should be added to a new datatable3.
For those who want to try this,please try it for a table with 10 columns and take mandatory columns as 4 instead of 12. Select your own datatype for each of the column.