I have one enum and one function like this
enum DaysOfWeek
{
Sunday = 1,
Monday = 2,
Tuesday = 4,
Wednesday = 8,
Thursday = 16,
Friday = 32,
Saturday = 64
}
public void RunOnDays(DaysOfWeek days)
{
// Do your work here..
}
// Im Calling The Function like this and passing the parameters with Pipe Seprated
RunOnDays(DaysOfWeek.Tuesday | DaysOfWeek.Thursday);
Now Scenario is In MY UI I have some checkboxes like Monday to sunday and user can select all days or can select at least one. And I want to pass the selected values to my function RunOnDays. So it can be single value or many values. How I can pass values dynamically to that method on the selection of user.