赞
踩
var listlog = logs.ToList();
listlog.Sort(delegate (LogIf p1, LogIf p2) { return Comparer<DateTime>.Default.Compare(p1.DataTime, p2.DataTime); });
for (var i = 1; i <= logs.Count; i++)
{
logs[i - 1] = listlog[i - 1];
logs[i - 1].Index = (byte)i;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。