LinkedHashMap in .NET

后端 未结 6 1969
天涯浪人
天涯浪人 2020-11-29 09:54

I wonder if there is a counterpart to java.util.LinkedHashMap in .NET? (ie. the elements are (re)ordered automatically if I access an element. (boolean accessOr

6条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 10:51

    As there is still no LinkedHashMap in C#, and I needed this functionality, I've implemented one on the latest net core (3.1). https://github.com/idlerboris/LinkedHashMap/blob/master/CustomCollections/CustomCollections/LinkedHashMap.cs. It's covered with basic tests and seems to be good, but feel free to contribute/report issues.

提交回复
热议问题