Editorconfig Guide.e

Prefer not pattern

EditorConfig key: csharp-style-prefer-not-pattern

Prefer not pattern

csharp-style-prefer-not-pattern

This option controls whether the not pattern should be preferred over negating the result of an is expression.

Default value:

true

Possible values:

  • true
  • false

Examples

true
if(o is not C c)
false
if(!(o is C c))