title: How to pass a DaysOfTheWeek enum value dynamically through code
body: <p>I have the below enum value in task scheduler class, while I am creating a task I need to add days of the week depending on the checkbox selection. If the Monday checkbox is selected, I need to pass only Monday (or sometimes multiple days if other checkboxes are also selected).</p>
  
  <p>In that below code how can I pass the multiple days dynamically?</p>
  
  <pre><code>public enum DaysOfTheWeek: short
  {
      Sunday = 1,
      Monday = 2,
      Tuesday = 4,
      Wednesday = 8,
      Thursday = 16,
      Friday = 32,
      Saturday = 64,
      AllDays = 127
  }
  
  DaysOfWeek = DaysOfTheWeek.Monday | DaysOfTheWeek.Sunday;
  </code></pre>