如何在无序集合中存储Integer和Boolean键值对?

Nat*_*ith 1 .net

我需要在.NET中存储(integer,boolean)键值对的列表

当我使用字典时,它会重新排序它们.是否有内置的集合来处理这个问题.

Vin*_*vic 8

    List<KeyValuePair<int, bool>> l = 
                        new List<KeyValuePair<int, bool>>();
    l.Add(new KeyValuePair<int, bool>(1, false));
Run Code Online (Sandbox Code Playgroud)