I am working with Visual Studio 2017 RC. I found that Connect (); The link you provided is incorrect. The syntax of the example you specified compiles and works.
As a test, I used the following code:
public class Foo { public int Bar { get; set; } public void Deconstruct(out int bar) { bar = Bar; } } var foo = new Foo { Bar = 3 }; var (num) = foo;
In the above example, the variable num is an int with a value of 3. The variable obj is an object Foo with the same reference as Foo .
The following does not compile:
(int num) = foo; (var num) = foo;
Matt rowland
source share