In some languages (such as PHP, Haskell, or Scala), you can assign multiple variables from tuples in a way that resembles the following pseudocode:
list(string value1, string value2) = tupleWithTwoValues;
I can't find a way to do this in C#, however, without writing longer, uglier code:
string firstValue = tupleWithTwoValues.Item1;
string secondValue = tupleWithTwoValues.Item2;
This two-line solution is obviously not the end of the world, but I'm always looking for ways to write prettier code.
Does anyone know a better way to do this?