Note: I assumed I didn't have to make this any clearer, but this question is not about renaming the parameters in a tuple, it's about renaming the parameters' types.
For example:
public class Foo
{
public static (Foo, Foo) GetTuple() => (new Foo(), new Foo());
}
If I put the cursor on either Foo
inside the tuple return type and invoke the refactor > rename functionality, I get the familiar error "You cannot rename this element". Why?
I understand there are complexities around renaming tuple parameters themselves, if used, e.g. first
and second
in (Foo first, Foo second)
, but those complexities definitely do not extend to the types of the parameters.