Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Constructor color in Resharper?

Is it possible in Resharper (8.2) to add custom colors for constructors ?

Currently I don't see any entry

Question

Is there any config file / other way which I can add colors to constructors ?

like image 561
Royi Namir Avatar asked Jun 28 '26 17:06

Royi Namir


1 Answers

No, constructors don't have their own custom colour. Instead, if you enable "Color identifiers" in the ReSharper -> Options -> Code Inspections -> Settings page, then constructors are identified as a class identifiers, using the "ReSharper Class Identifier" colour in Visual Studio's options.

The logic for using "class identifier" here makes more sense when you look at a call to new MyClass(). The MyClass part of that expression is also treated as a class identifier - after all, you're creating a new instance of the MyClass class, and this is also a constructor. So, it makes sense to highlight a constructor declaration and a constructor usage the same, as class identifiers.

And to answer the other part of the question, there isn't a way to change the colour used by constructors other than changing the class identifier colour.

like image 55
citizenmatt Avatar answered Jul 01 '26 07:07

citizenmatt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!