Sorting an IList in C#

前端 未结 15 2340
臣服心动
臣服心动 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:02

    You're going to have to do something like that i think (convert it into a more concrete type).

    Maybe take it into a List of T rather than ArrayList, so that you get type safety and more options for how you implement the comparer.

提交回复
热议问题