Visual studio c # color code of this

I played with the colors of various C # elements in my new Visual Studio 2017 (Community) using Tools-> Options-> Font and Colors. Everything is different from the this .

Does anyone know which display element that can change color will affect the this ?

+5
source share
3 answers

There is an analyzer rule

IDE0003 The name can be simplified

with the option "Delete qualification 'this'".

I did not find a way to set a different color, but the rule can be turned off so that the dimming does not apply: fooobar.com/questions/829875 / ...

This is specifically for this (or Me in VB).

+3
source

This is just a keyword, the same as everyone else. I don’t think you can say VS to set it differently for other keywords.

+2
source

After a bit more encodings with this new toy, it seems that the unnecessary this keywords are colored differently than the necessary ones. The same goes for unnecessary using statements.

As John Skeet says, this is a keyword and colored like other keywords, but it seems there are no unnecessary ones. Since I do not like color, it gives some incentive to get rid of them.

+2
source

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


All Articles