public int CompareTo(object obj) { Customer other = obj as Customer; return String.Compare(this.Name, other.Name, true); }
Customer类实现了Icomparable接口了,就是比较实体中的一个字段 public int CompareTo(object obj) { Customer other = obj as Customer; return String.Compare(this.Name, other.Name, false); } 可还是无法排序呀。
dataGrid1.Refresh();
{
Customer other = obj as Customer;
return String.Compare(this.Name, other.Name, true);
}
public int CompareTo(object obj)
{
Customer other = obj as Customer;
return String.Compare(this.Name, other.Name, false);
}
可还是无法排序呀。