Resharper: Do not expand var for Tuples

83 views Asked by At

I have Resharper expanding (converting to explicit type) "var" when type is not evident. But it also expands "var" for long Tuples, like

var value = CallTuple();

becomes

(int valueA, string valueB, string valueC) value = CallTuple();

Is it possible to stop such conversion only for Tuples, leaving it for other types?

So

var intValue = CallInt();

becomes

int intValue = CallInt();

while

var value = CallTuple();

remains the same

var value = CallTuple();
1

There are 1 answers

0
Tobias Brohl On BEST ANSWER

No, basically not. Resharper and Rider only allow differentiation between builtin and simple types and for everywhere else. Differentiation for specific types e.g. Tuple<> is not possible