Basically, the Tuple functions as a convenient way to NOT make a custom class to accomplish something. It is highly flexible and could provide a variety of uses, however since it can be very generic, you should be sure to properly document its usage.
发布评论
评论(1)
以下是一些资源,其中提到了元组的用途、如何使用它们以及它们的用途:
C# 中元组的实际用法
利用元组
在中使用元组.NET 4.0 | Stack Overflow
C# 中的元组支持 | Stack Overflow
元组的用法和优点 | DotNetSpeaks
摘要:
基本上,元组的功能是不创建自定义类来完成某些任务的便捷方法。它非常灵活,可以提供多种用途,但是由于它非常通用,因此您应该确保正确记录其用法。
Here are a few resources that mention the purposes of Tuples, how they can be used and what they can be used for:
The Practical Usage of Tuples in C#
Making Use of Tuples
Using Tuples in .NET 4.0 | Stack Overflow
Tuple Support in C# | Stack Overflow
Usages and Advantages of Tuples | DotNetSpeaks
Summary:
Basically, the Tuple functions as a convenient way to NOT make a custom class to accomplish something. It is highly flexible and could provide a variety of uses, however since it can be very generic, you should be sure to properly document its usage.