实用的例子,元组可以在.NET 4.0中使用吗? [英] Practical example where Tuple can be used in .Net 4.0?

查看:163
本文介绍了实用的例子,元组可以在.NET 4.0中使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到在.NET 4中引入的元组,但我不能想象在那里可以它用。我们总是可以做一个自定义类或结构。

I have seen the Tuple introduced in .Net 4 but I am not able to imagine where can be it be used. We can always make a Custom class or Struct.

推荐答案

这一点 - 它是更方便的没有的做出一个自定义的类或结构的所有时间。这就像动作 Func键的改善...你可以让这个类型的自己,但它们的存在很方便在框架

That's the point - it is more convenient not to make a custom class or struct all the time. It is an improvement like Action or Func... you can make this types yourself, but it's convenient that they exist in the framework.

这篇关于实用的例子,元组可以在.NET 4.0中使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆