using System.Collections.Generic; namespace Core.StlMes.Client.Judge.Commons { /// /// 按照字符串长度比较大小 /// class ChemComparer : IComparer { public int Compare(string x, string y) { if (x.Length == y.Length) return 0; else if (x.Length < y.Length) return -1; else return 1; } } }