How can I shorten List>>?

后端 未结 5 1184
醉酒成梦
醉酒成梦 2021-01-19 07:04

I want to store an list of key value pair lists in a lightweight structure. This seems too cumbersome. What\'s better? Does List> add

5条回答
  •  萌比男神i
    2021-01-19 07:55

    Consider using aliasing for shorthand:

    namespace Application
    {
        using MyList = List>>;
    
        public class Sample
        {
            void Foo()
            {
                var list = new MyList();
            }
        }
    }
    

提交回复
热议问题