Multiple parameters in a List. How to create without a class?

后端 未结 10 1997
不知归路
不知归路 2020-12-12 23:25

This is probably a pretty obvious question, but how would I go about creating a List that has multiple parameters without creating a class.

Example:

10条回答
  •  感情败类
    2020-12-13 00:08

    If appropriate, you might use a Dictionary which is also a generic collection:

    Dictionary d = new Dictionary();
    d.Add("string", 1);
    

提交回复
热议问题