vtTick.Sort((Comparison<CtpTick>)delegate(CtpTick a,CtpTick b)
{
if (a.UpdateTime < b.UpdateTime)
return -1;
if (a.UpdateTime > b.UpdateTime)
return 1;
if (a.doneVolume < b.doneVolume)
return -1;
if (a.doneVolume > b.doneVolume)
return 1;
//下面是无奈之举,都怪CTP没有updSerial,加个序号很难吗!?
if (a.WriteTime < b.WriteTime)
return -1;
if (a.WriteTime > b.WriteTime)
return 1;
return 0;
});
c# List Sort 简单实现
最新推荐文章于 2025-06-05 20:23:41 发布