The following is just a question about the language itself, I started thinking about this before releasing a better way to architect my code but it got me interested.
If I have a method of this structure
private void Foo<T>(T bar){
//do stuff with tuples
}
And in a different class and method, I have a variable
(int first, int second) myTuple = (1,2);
In the scope of this variable, I can do things like
var firstValue = myTuple.first;
Is there anyway I could pass myTuple
down to Foo
which would maintain the naming of elements within the tuple so that I could do something like bar.firstValue
?