Sorting an IList in C#

前端 未结 15 2380
臣服心动
臣服心动 2020-11-28 06:36

So I came across an interesting problem today. We have a WCF web service that returns an IList. Not really a big deal until I wanted to sort it.

Turns out the IList

15条回答
  •  星月不相逢
    2020-11-28 07:01

    Convert your IList into List or some other generic collection and then you can easily query/sort it using System.Linq namespace (it will supply bunch of extension methods)

提交回复
热议问题