I have seen the Tuple introduced in .Net 4 but I am not able to imagine where it can be used. We can always make a Custom class or Struct.
You should be very careful with using Tuple
and probably think twice before do this. From my previous experience I found out that using Tuple
makes code very difficult to read and support in the future. A while ago, I had to fix some code where tuples were used almost everywhere. Instead of thinking about proper object models, they just used tuples. That was nightmare... sometimes I wanted to kill the guy who wrote the code...
Don't want to say that you shouldn't use Tuple
and it's evil or something and I'm hundred percent sure there are some tasks where the Tuple
is the best candidate to be used, but probably you should think again, do you REALLY need it?