concept deconstruction in category c#

This is an excerpt from Manning's book C# in Depth, Fourth Edition.
The C# 5 language specification requires that caller information be used only when a function is explicitly invoked in source code, with the exception of query expressions that are deemed to be syntactic expansions. Other C# language constructs that are pattern based don’t apply to methods with optional parameters anyway, but constructor initializers definitely do. (Deconstruction is a C# 7 feature described in section 12.2.) The language specification calls out constructors as an example in which caller member information isn’t provided by the compiler unless the call is explicit. The following listing shows a single abstract base class with a constructor using caller member information and three derived classes.
That certainly works, and in many cases it’s all you need. But in plenty of cases, you’ll want to break a composite value into separate variables. This operation is called deconstruction. That composite value may be a tuple, or it could be of another type—KeyValuePair, for example. C# 7 provides simple syntax to allow multiple variables to be declared or initialized in a single statement.
Deconstruction occurs in an unconditional way just like a sequence of assignments. Pattern matching is similar, but in a more dynamic context; the input value has to match the pattern in order to execute the code that follows it. C# 7 introduces pattern matching in a couple of contexts and a few kinds of patterns, and there will likely be more in future releases. We’ll start building on chapter 11 by deconstructing the tuples you’ve just created.
Listing 12.1. Overview of deconstruction using tuples
var tuple = (10, "text"); #1 var (a, b) = tuple; #2 (int c, string d) = tuple; #3 int e; #4 string f; #4 (e, f) = tuple; #4 Console.WriteLine($"a: {a}; b: {b}"); #5 Console.WriteLine($"c: {c}; d: {d}"); #5 Console.WriteLine($"e: {e}; f: {f}"); #5
This also works with deconstruction that requires an implicit conversion from an expression to the target type. For example, using our favorite “int constant within range of byte” example, the following is valid:
(byte x, byte y) = (5, 10);Like many good language features, this is probably something you might have implicitly expected, but the language needs to be carefully designed and specified to allow it. Now that you’ve looked at tuple deconstruction fairly extensively, deconstruction of nontuples is relatively straightforward.