i know that i have null values in the table so how do i check if it is null?
if (ds.Tables[1].Rows.Count > 0)
{
for (int i = 0; i <= ds.Tables[1].Rows.Count - 1; i++)
{
int myquestion = (int)ds.Tables[1].Rows[i]["Question"]; <<<<error Specified cast is not valid.
int myanswer = (int)ds.Tables[1].Rows[i]["Answer"];
.....
}
Go to the complete details ...