I have the folloving method.
private ref (int, int) GetValue()
{
var array = new (int, int)[1];
return ref array[0];
}
The following code works fine:
var (s1, s2) = GetValue();
But i need to use the ref
feature. The following code also works:
ref var r = ref GetValue();
Now i want to deconstruct the tuple. The following code won't compile:
ref var (r1, r2) = ref GetValue();
Is it possible to deconstruct ref
variable?