Ez LINQ Noob Question
How can I make this return a true/false? Is there a way to clean this up without adding a
.Count() > 0call?
bool onlyContainsQuarters = allDates.Where(x => quarterEndMonths.Any(prefix => x.StartsWith(prefix)));
quarterEndMonthsis a hashset of prefixes.
Would this not work?:
bool onlyContainsQuarters = allDates.Any(x => quarterEndMonths.Any(prefix => x.StartsWith(prefix)));
replace Where with Any i think
yea thats what i was actually just typing up lol
ah someone beat me
just caught it too 😛 these LINQ still sometimes get me for sure
appreciate it all