Can C # 7 tuples destructure in parameter lists?

I am confused by C # 7 tuples and, frankly, the very light amounts of documentation around them.

For example, I know from examples that I can do this

var tup = (a: 1, b: 2);
(var a, var b) = tup;

      

But this is literally the only example I see. I know from experience in other languages ​​that it is much more common to want to destroy tuples in parameter lists.

so something like

test(tup);

      

...

int ((int a, int b)) => a + b;

      

But I can't understand the syntax and can't find any examples - is it possible at all?

+3


source to share





All Articles