try this from data table use data column and compare values and copy the values except those you want to remove
DataTable DataTablecase = new DataTable("count");
da4.Fill(DataTablecase);
DataColumn dc6 = DataTablecase.Columns[0];
DataColumn dc7 = DataTablecase.Columns[1];
if (DataTablecase.Rows.Count > 0)
{
foreach (DataRow row1 in DataTablecase.Rows)
{
if((Convert.ToInt32(row1[dc6])!=2)||(Convert.ToInt32(row1[dc6])!=5))
{
a[i]=Convert.ToInt32(row1[dc6]);
b[i]=(row1[dc7].ToString())
i++;
}
}
}