How can I sort List based on properties of T?

后端 未结 4 891
误落风尘
误落风尘 2020-12-28 18:21

My Code looks like this :

Collection optionInfoCollection = ....
List optionInfoList = new List

        
4条回答
  •  长发绾君心
    2020-12-28 19:02

    You need to set up a comparer that tells Sort() how to arrange the items.

    Check out List.Sort Method (IComparer) for an example of how to do this...

提交回复
热议问题