C# language feature:

  • Deconstruction

applies to

  • tuples

benefit

  • Used to split up a tuple into multiple values during assignment/invocation.

how to use

  • Specify the return value types/identifier of a a method delimited by , enclosed in () followed by method assignment.

example:

        void Deconstruction_Example()
        {
            (string first, string last) = GetPersonsName();  // see Tuples for definition of GetPersonName
        }