Hi,
use below sample
bool isExists=false;
foreach(DataRow dr in dt.Rows)
{
foreach (DataColumn dc in dt.Columns)
{
switch (dc.Ordinal)
{
case 0:
{
if( string.IsNullOrEmpty(dr[dc].ToString()))
{
isExists=true;
break;
}
}
}
}
}
Continue, statement will continue the next statement, instead of that better to use break; it's breaks the current looping and give you the result set.