如何缩短List <List <KeyValuePair <string,string >>>?

pau*_*hit 3 c# generics collections types list

我想在轻量级结构中存储键值对列表的列表.这看起来太麻烦了.什么更好?List <Dictionary <string,string >>是否增加了很多开销?还有哪些其他选择?

Nic*_*ggs 10

考虑使用别名来缩写:

namespace Application
{
    using MyList = List<List<KeyValuePair<string, string>>>;

    public class Sample
    {
        void Foo()
        {
            var list = new MyList();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)