Advertisement
desislava_topuzakova

Untitled

Jul 5th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public List<Student> SortAscendingByName()
  2. {
  3. students = students.OrderBy(s => s.Name).ToList();
  4.  
  5. return students ;
  6. }
  7.  
  8. public List<Student> SortDescendingByGrade()
  9. {
  10. students = students.OrderByDescending(s => s.Grade).ToList();
  11.  
  12. return students ;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement