How to prevent resharper from juggling back and forth implicit and explicit variable declaration?

StackOverflow https://stackoverflow.com/questions/21647589

  •  08-10-2022
  •  | 
  •  

Domanda

I've recently started using resharper and have been following its advice while writing, including that usually it tells me to use implicit variable declaration. However when then using the code cleanup function it just turns them all back to explicit, promptly warning me that I should change them back again. How can I do something about this? Preferably I would want to keep it implicit.

È stato utile?

Soluzione 2

The only way to achieve this seems to be to create your own code profile, manually copy over the default settings, configure it to keep implicit/explicit the same, then always use that profile. You cannot edit the existing profiles or copy them, you need to entirely create a new one from scratch.

Altri suggerimenti

When ReSharper asks you to change something you can click on the little warning icon it spawns on the left and click Inspection options for "..." and change the severity or the convention so ReSharper will leave you alone on that specific convention error.

If you do want this convention only don't want ReSharper to change it back, see this question: Resharper - How to turn off 'private' access modifier?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top