Trying to rewrite this using LINQ:
if (mode != "A" && mode != "B" && mode != "C" && mode != "D" && mode != "E" && mode != "F" && mode != "G")
{
continue;
}
What would be the most clear and concise way to refactor this? I could have sworn I’d seen a post like this before but I cannot find it at the moment.
You can use
Containsmethod fromIList<T>: