开发者

c# Best class to hold a list of values to look up after

I have a list of values that i need to check against a constant list to know wheter they 开发者_如何学运维are present or not (one by one).

Im using a dictionary buy it doesnt seem logical to have the value two times (key, value)...isnt there any class specialized for this case (and faster if possible)?

Also it would me more reasonable if it could be declared as a constant being a predefined list


Sounds like you need a HashSet.


Use HashSet<T>.


HashSet

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜