UiPath Automation Developer Professional v1 — Question 116
Which of the following statements correctly illustrates using LINQ to process data in a UiPath project?
Answer options
- A. Utilizing LINQ to find the total sum of integers in a list by writing listOfIntegers.Sum(Function(x) x).
- B. Applying LINQ to filter out emails in a list of strings containing multiple email addresses by writing listOfStrings.FilterEmails().ToList().
- C. Employing LINQ to convert DataTable to JSON format by writing dataTable.ToJSON().
- D. Using LINQ to identify the longest string in a list of strings by writing listOfStrings.Max(Function(x)x.Length()).
Correct answer: A
Explanation
Option A is correct because it accurately describes using LINQ to calculate the sum of integers in a list, which is a valid LINQ expression. Options B, C, and D are incorrect as they either use non-existent methods or have syntax errors that would prevent them from executing properly in a LINQ context.