📅  最后修改于: 2022-03-11 14:48:43.231000             🧑  作者: Mango
using System.Linq;
List list = new List()
{ new MyObject("Peterson", "Mike"), new MyObject("Johnson", "Tim") };
list.OrderBy((item) => item.LastName);
// In this example, the list would be arranged like so: Johnson, Peterson