GSSP-NET · Question #350
You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You have recently finished development of a Windows Forms…
The correct answer is A. They provide powerful filtering, ordering, and grouping capabilities with least application code. B. They can be ported to other data sources with slight or no alteration. D. They are more concise and readable, particularly when filtering multiple conditions. See the full explanation below for the reasoning.
Question
You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You have recently finished development of a Windows Forms application using .NET Framework 3.5. You have written complex foreach loops to retrieve data from collections. However, you want to modify the application, so that it uses LINQ queries in place of foreach loops. What will be the advantages of using LINQ queries instead of foreach loops? Each correct answer represents a part of the solution. Choose all that apply.
Options
- AThey provide powerful filtering, ordering, and grouping capabilities with least application code.
- BThey can be ported to other data sources with slight or no alteration.
- CThey provide lambda expression in the form of an expression tree.
- DThey are more concise and readable, particularly when filtering multiple conditions.
How the community answered
(25 responses)- A80% (20)
- C20% (5)
Community Discussion
No community discussion yet for this question.