Is Using .NET 4.0 Tuples in my C# Code a Poor Design Decision?

前端 未结 13 1852
我在风中等你
我在风中等你 2020-12-02 04:55

With the addition of the Tuple class in .net 4, I have been trying to decide if using them in my design is a bad choice or not. The way I see it, a Tuple can be a shortcut

相关标签:
13条回答
  • 2020-12-02 05:48

    Tuples can be useful... but they can also be a pain later. If you have a method that returns Tuple<int,string,string,int> how do you know what those values are later. Were they ID, FirstName, LastName, Age or were they UnitNumber, Street, City, ZipCode.

    0 讨论(0)
提交回复
热议问题