c# List Sort 简单实现
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;
});
浙公网安备 33010602011771号