ReSharper suggests using var. Can it do the other way around?

Resharper tells me to use the var keyword. Unfortunately, my new employer does not use the var keyword at all. This is why I have problems because I use the var keyword.

Can resharper be allowed to do the opposite? So, he warns me every time I use the var keyword and suggests that I explicitly declare a variable?

Thanks in advance!

Change \

I do not want to turn off the warning or something like that, I want to turn on this setting, so I will get a warning whenever I use var.

+4
source share
3 answers

"Resharper" - "" - " " - "", " var", " " " ", "" - ".

ReSharper Options Dialog - using var

+14

Resharper, #.

, .

.

+4

Resharper-Options-Code Inspection-Inspection Severity-C# var enter image description here

, var : enter image description here

+1
source

Source: https://habr.com/ru/post/1607814/


All Articles