Question
Multiple Choice
You are developing a card game for F54. The applicaton 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 flteredEmployeeIds.
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.
- A. int[] filterEmployeeIds = employeeIds.Where(value => value != employeeIdToRemove).OrderBy(x => x).ToArray();
- B. int[] filterEmployeeIds = employeeIds.Where(value => value != employeeIdToRemove).OrderByDescending(x => x).ToArray();
- C. int[] filterEmployeeIds = employeeIds.Distinct(value => value != employeeIdToRemove).OrderByDescending(x => x).ToArray();
- D. int[] filterEmployeeIds = employeeIds.Distinct().OrderByDescending(x => x).ToArray();