Customise “Light Bulb” Quick Action Rules

2019-01-09 09:11发布

问题:

The question relates to where can one customise the rule set for the new Visual Studio 2015 Light Bulb or Quick Actions feature.

Specifically I want to disable the one imaged below, for "simplifying" String.IsNullOrWhiteSpace to string.IsNullOrWhiteSpace.

The warning message given is:

IDE0001 Name can be simplified.

回答1:

Tools -> Options -> Text Editor -> C# -> Code Style

Then untick the following:

Prefer intrinsic predefined type keyword in member access expressions