Microsoft
70-515 · Question #28
70-515 Question #28: Real Exam Question with Answer & Explanation
Sign in or unlock 70-515 to reveal the answer and full explanation for question #28. The question stem and answer options stay visible for context.
Question
You are implementing an ASP.NET application. You add the following code segment. public List<Person> GetNonSecretUsers() { string[] secretUsers = {"@secretUser", "@admin", "@root"}; List<Person> allpeople = GetAllPeople(); ... } You need to add code to return a list of all Person objects except those with a UserId that is contained in the secretUsers list. The resulting list must not contain duplicates. Which code segment should you use?
Options
- Avar secretPeople = (from p in allPeople
- Breturn from p in allPeople
- Creturn (from p in allPeople
- DList<Person> people = new List<Person>(
Unlock 70-515 to see the answer
You've previewed enough free 70-515 questions. Unlock 70-515 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.