List<字典> 排序(coding记录)
#region 给中侧板排序
System.Comparison<P03tatamiMiddleSidePanlCentre> comparison = new System.Comparison<P03tatamiMiddleSidePanlCentre>
((P03tatamiMiddleSidePanlCentre x, P03tatamiMiddleSidePanlCentre y) =>
{
if (x.PY < y.PY)
return -1;//小于
else if (x.PY == y.PY)
return 0;//等于
else
return 1;//大于
});//将数据从小到大排序
MiddlePanelLong.Sort(comparison);
int i = 1;
foreach (P03tatamiMiddleSidePanlCentre mspc in MiddlePanelLong)
{
mspc.OdinalY = i;
i++;
}
#endregion