且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

列表中的多个参数.如何在没有课程的情况下进行创作?

更新时间:2023-09-12 10:18:22

如果使用的是.NET 4.0,则可以使用

If you are using .NET 4.0 you can use a Tuple.

List<Tuple<T1, T2>> list;

对于旧版本的.NET,您必须创建一个自定义类(除非您很幸运能够在基类库中找到满足您需要的类).

For older versions of .NET you have to create a custom class (unless you are lucky enough to be able to find a class that fits your needs in the base class library).