using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UserControlLib { public class ViewItem : IComparable { public int Index { get; set; } public string Text { get; set; } public int IsValueCol { get; set; } public string TagId { get; set; } public string TagType { get; set; } public int CompareTo(object obj) { ViewItem viewItem = (ViewItem)obj; return this.Index-viewItem.Index; } } }