David Smith

David Smith

  • NA
  • 2k
  • 0

C Sharp BOF & EOF

Dec 9 2014 10:14 PM
What would be the best robust approach for the BOF & EOF logic in c sharp class along with robust error handling?? I am creating BOF and EOF static extension methods below.
 
 
Return false if record count is less than 0, else return true 
public static bool BOF(this DataTable datatable, int index)
{
try
{
return false;
}
catch (Exception ex)
{
throw new Exception("BOF: \n" + ex.Message);
}
}

Greater than or equal to count;
public static bool EOF(this DataTable datatable, int index)
{
try
{
return false;
}
catch (Exception ex)
{
throw new Exception("EOF: \n" + ex.Message);
}