How to sort a List by double value?

后端 未结 3 496
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-01 07:35

This sound simple but it not that much.

I want to order a List based on one of the properties of T, which is double type.

3条回答
  •  滥情空心
    2021-01-01 08:30

    I think this sould do the trick:

    List list = new List();
    //fill list here    
    list.OrderBy(item => item.DoubleTypeProperty).ToList();
    

    HTH

提交回复
热议问题