Tuples In C#

Costas

Administrator
Staff member
Often, we want to return more than one value from a class method. Prior to the introduction of tuples in .NET, there were three common ways to do so.

-Out parameters
-Class or struct types
-Anonymous types returned through a dynamic return type

Tuples solve this problem. Tuples aren’t new to C# or .NET. Tuples were first introduced as a part of .NET Framework 4.0.


http://www.c-sharpcorner.com/article/tuples-in-c-sharp/
 
Top