I am storing a list of Choices of Enum values and my Enum looks like below
enum OrderDay
{
Sunday,
Monday,
Wednesday,
Friday,
Saturday
};
List<OrderDay> DayChoices; //List stores the selected values
Initially the List contains 3 values
{
Wednesday,
Friday,
Saturday
}
How to filter out a specific value from this list and makes list as
{
Wednesday,
Friday
}
This is the code i was trying , but ended up as build error. Trying to recreate the list without the given day value
private async Task OnChipDayEnumClose(OrderDay val)
{
DayChoices = DayChoices.Where(s => s != val).ToList();
}