I have a list
var _PublicHoliday = _db.tbl_HolidayMasters.Where(x => x.IsDelete == false).ToList();
and i am geting each item using foreach loop
foreach (var objPublicHoliday in _PublicHoliday)
{
if ((Convert.ToDateTime(DateTo.Text).AddDays(1)).Equals(objPublicHoliday.HolidayDate))
{
todate = Convert.ToDateTime(todate).AddDays(1).Date.ToShortDateString();
flagHoliday = 1;
}
}
Whenever I moved next holiday date the how can get previous holiday date in list?
Thanks