I have a list that I am iterating through as follows.
foreach (Statistics value in data.Where(x => x.DateOrTime >= start[0]))
However, I want to add a check if myVariable == 0 then do it the way above. Else do it as follows.
foreach (Statistics value in data)
So basically, I want to do an if/else within the expression.
How about:
Alternatively: