Microsoft
70-515 · Question #158
70-515 Question #158: Real Exam Question with Answer & Explanation
Sign in or unlock 70-515 to reveal the answer and full explanation for question #158. The question stem and answer options stay visible for context.
Question
You are implementing an ASP.NET page. Client-side script requires data. Your application includes a class named Person with a Name property of type string. The code-behind file of the page includes the following code segment. public string JsonValue; List<Person> people = GetPeopleList(); JavaScriptSerializer json = new JavaScriptSerializer(); You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the people list. Which code segment should you use?
Options
- AJsonValue = json.Serialize(people.Select(p => p.Name));
- Bvar names = from person in people
- CJsonValue = json.Serialize(people.SelectMany(
- Dvar names = from person in people
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.