I have a dataset that has just one column and one row. It gives me an integer. I have to save it in an other integer. I am a learner. please help me out! Thanks!
Dataset pds;
if (pds.Tables[0].Rows.Count > 0)
{
int Islocationcount = pds.Tables[0].Columns[0].ColumnName[1];
}
You want
assuming it won’t be
DBNull.Value, otherwise it will throw an exception