Linq Query with IF condition

Hi Guys,

I have a List - FilteredQItems, that contains a list of Queue Items pulled from a Queue.

I want to check if the Statuses of all those Queue items in my list FilteredQitems are Success or Not. If all items’ statuses are successful, then Assign True to a boolean variable bol_Flag, else (even if one QueueItem status is failed) assign False to the boolean variable bol_Flag. Can I achieve this using the Linq query?

FilteredQItems.All(Function (x) x.Status = QueueItemStatus.Successful)

Thanks @ppr It’s working.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.