Visualstudio-docs: Use var when extracting variable

Created on 11 Jun 2019  Â·  3Comments  Â·  Source: MicrosoftDocs/visualstudio-docs

Would it be possible to get a setting (if not default behavior) to use var when introducing the variable, instead of the explicit type (e.g. Random in the example above)?

(Recreating this on behalf of @sbrockway due to accidental transfer of the original issue he logged.)


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

product-question visual-studio-windowprod vs-ide-generatech

Most helpful comment

/cc @kendrahavens
I'm wondering if the code style settings for "var" preferences have any effect on this refactoring?

image

All 3 comments

/cc @kendrahavens
I'm wondering if the code style settings for "var" preferences have any effect on this refactoring?

image

Apologies for the accidental transfer of the original issue @sbrockway - and GitHub won't let me transfer it back.

@gewarren you are correct. Those settings work perfectly. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaanV2 picture DaanV2  Â·  4Comments

suhailmahmood picture suhailmahmood  Â·  3Comments

wittelw picture wittelw  Â·  3Comments

rlundy picture rlundy  Â·  3Comments

H35am picture H35am  Â·  4Comments