Exam4Training

Which LINQ method is used to filter data in a List or Data Table based on a condition?

Which LINQ method is used to filter data in a List or Data Table based on a condition?
A . OrderBy
B . Where
C . GroupBy
D . Select

Answer: B

Explanation:

The Where method is used to filter data in a List or Data Table based on a condition. It returns a new collection that contains only the elements that satisfy the condition12. The other methods are used for different purposes: OrderBy for sorting, GroupBy for grouping, and Select for projecting3.

Reference: Linq query to filter datatable forum post, Answer by @ppr

How to use LINQ on a DataTable in Uipath forum post, Answer by @Dave

How to use LINQ [Basic to Advanced] in UiPath event description, Introduction section

Exit mobile version