using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UserControlLib { public class ViewHeader:IComparable { /// /// 列排序 /// public int Index { get; set; } /// /// 列显示名称 /// public string Text { get; set; } /// /// 列名 /// public string Name { get; set; } public int Width { get; set; } /// /// 是否为值字段 /// public int HeaderType { get; set; } public int CompareTo(object obj) { ViewHeader header = (ViewHeader)obj; return this.Index-header.Index; } } }