70-511 · Question #76
You are developing a Windows Presentation Foundation (WPF) application for managing student information. You place a Button control named btnSort and a DataGrid control named dgStudents on the…
The correct answer is A. IEnumerable<Student> sortedStudents =. See the full explanation below for the reasoning.
Question
You are developing a Windows Presentation Foundation (WPF) application for managing student information. You place a Button control named btnSort and a DataGrid control named dgStudents on the design surface of the MainWindow.xaml file. You create a Student class with two properties:
FirstName and LastName. You create the following code segment in the constructor of the main window. The DataGrid control displays the list of students unsorted. You need to ensure that the list of students is sorted by last name. Which code segment should you add to the click event handler of the Button control?
Exhibit
Options
- AIEnumerable<Student> sortedStudents =
- BStudents.Sort ();
- CStudents.Reverse ( );
- DIEnumerable<student> sortedStudents =
How the community answered
(22 responses)- A73% (16)
- B18% (4)
- C5% (1)
- D5% (1)
Community Discussion
No community discussion yet for this question.
