Author: titi | Posted on: 7/2/2010 11:41:38 AM | Views : 903

I'm trying to check if a day is in the holiday list, but getting an error "Can not assign CheckHoliday because it is a method group". Please help!
DateTime defaultDate = DateTime.Now;
if (CheckHoliday(defaultDate)) 
//do something...
protected bool CheckHoliday(DateTime myDate)
{
        ArrayList holidayList = new ArrayList();
        holidayList.Add(Convert.ToDateTime("January 1, 2010"));
        holidayList.Add(Convert.ToDateTime("July 4, 2010"));
        CheckHoliday = holidayList.Contains(myDate);
}
...

Go to the complete details ...