Is it possible to sort a HashTable?

前端 未结 11 723
不知归路
不知归路 2021-01-17 10:13

I have a property that returns a HashTable. I would like to sort it without refactoring my property. Please note: I do not want to return another type.

11条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-17 11:02

    I am a new programmer so take everything I say with a grain of salt. But here is what I did when I ran into a similar situation. I created a class that had two variables and then created a List object off those variables and then I used linq to sort those variables.

提交回复
热议问题