Hi Tony-6084,
Please refer to following code:
bool b= list.GroupBy(x => x.level).All(g => g.Last().operators == "-" && g.Count(x => x.operators== "-") == 1);
If it does not meet the requirements, please provide your code snippets and more details.
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.