Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 - Code style settings

In the new Visual Studio 2015 I get the following "Name can be simplified" quick action. I prefer using String over string when using the static methods of the String class because gives a better overview.

I have looked for an option to customize this under: TOOLS -> Options -> Text Editor -> C# -> Code Style, but there was not much there.

Is there anyway I can customize this settings? Or even better if I can customize these settings for everyone working on the solution/project? So everyone uses the same coding style.

like image 553
Nexith Avatar asked Sep 07 '25 16:09

Nexith


1 Answers

I just came across this myself and agree on String vs string for static methods. I think you were correct in looking in TOOLS -> Options -> Text Editor -> C# -> Code Style, because I unticked "Prefer intrinsic predefined type keyword in member access expressions" and this got rid of the "Name can be simplified" message that I was experiencing.

Did you try this or are you looking to have more control over the customisations?

like image 135
tagustini Avatar answered Sep 10 '25 08:09

tagustini