Wednesday, July 06, 2011

How to find the WeekEnd days in C#

This code snippet will used to find out the WeekEnd days in C#.Once you find out then you can write your own business requirement logic to be build.
  public bool isWeekEnd(DateTime dt)
        if (dt.DayOfWeek == DayOfWeek.Saturday || dt.DayOfWeek == DayOfWeek.Sunday)
        { return true; }
        { return false; }