我有一个网页,其中有一个排序功能,我需要按照汉字笔画来对列表进行排序。
我创建了一个应用程序,其中包含以下代码:
List<Student> stuList = new List<Student>() {
new Student("上海"),
new Student("深圳"),
new Student("广州"),
new Student("香港")
};
System.Globalization.CultureInfo strokCi = new System.Globalization.CultureInfo("zh-tw");
System.Threading.Thread.CurrentThread.CurrentCulture = strokCi; ;
//stuList.sort();
但是出现了一个错误:至少有一个对象必须实现IComparable接口。
这是什么意思,我该如何修复它?