Click or drag to resize
RecurrenceDay Enumeration

Specifies the days of the week. Members might be combined using bitwise operations to specify multiple days.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
public enum RecurrenceDay
  Member nameValueDescription
None0Indicates no selected day.
Sunday1Indicates Monday.
Monday2Indicates Tuesday.
Tuesday4Indicates Wednesday.
Wednesday8Indicates Thursday.
Thursday16Indicates Friday.
Friday32Indicates Saturday.
Saturday64Indicates Sunday.

Indicates the range from Sunday to Saturday inclusive.

WeekDays62Indicates the range from Monday to Friday inclusive.
WeekendDays65Indicates the range from Saturday to Sunday inclusive.
The constants in the RecurrenceDay enumeration might be combined with bitwise operations to represent any combination of days. It is designed to be used in conjunction with the RecurrencePattern class to filter the days of the week for which the recurrence pattern applies.

Consider the following example that demonstrates the basic usage pattern of RecurrenceDay. The most common operators used for manipulating bit fields are:

  • Bitwise OR: Turns a flag on.
  • Bitwise XOR: Toggles a flag.
  • Bitwise AND: Checks if a flag is turned on.
  • Bitwise NOT: Turns a flag off.
using System;
using Kettic.AspNet.Controls;

namespace RecurrenceExamples
    class RecurrenceDayExample
        static void Main()
            // Selects Friday, Saturday and Sunday.
            RecurrenceDay dayMask = RecurrenceDay.Friday | RecurrenceDay.WeekendDays;

            // Selects all days, except Thursday.
            dayMask = RecurrenceDay.EveryDay ^ RecurrenceDay.Thursday;

        static void PrintSelectedDays(RecurrenceDay dayMask)
            Console.WriteLine("Value: {0,3} - {1}", (int) dayMask, dayMask);

This example produces the following results:

Value: 112 - Friday, WeekendDays
Value: 119 - Monday, Tuesday, Wednesday, Friday, WeekendDays*/
See Also