You are developing an application. The application calls a method that returns an array of integers
named employeeIds. You define an integer variable named employeeIdToRemove and assign a value to it.
You declare an array named filteredEmployeeIds.
You have the following requirements:
-Remove duplicate integers from the employeeIds array.
-Sort the array in order from the highest value to the lowest value.
-Remove the integer value stored in the employeeIdToRemove variable from the employeeIds array.
You need to create a LINQ query to meet the requirements.
Which code segment should you use?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Explanation:
C is the only one of the answers that includs the “Distinct” clause in order to eliminate duplicate values.
C.
Option C
only option C has Distinct,order by and remove option so correct one is
Option C
can anybody help me!!!
i can’t understand the answer
distict() will remove the duplicate entry
higer value to lower value means OrderByDesending()
where condition checks that record need to be removed.
So Option C
C