Skip to main content

NullCheckStyles Enum

Namespace: Roslynator.CSharp

Assembly: Roslynator.CSharp.dll

Specifies a null check.

[Flags]
public enum NullCheckStyles

Inheritance

Object ValueType Enum NullCheckStyles

Attributes

Fields

NameValueCombination ofSummary
None0No null check specified.
EqualsToNull1x == null
NotEqualsToNull2x != null
ComparisonToNull3EqualsToNull | NotEqualsToNullExpression that uses equality/inequality operator.
IsNull4x is null
NotIsNull8!(x is null)
NotHasValue16!x.HasValue
CheckingNull21EqualsToNull | IsNull | NotHasValueExpression that checks whether an expression is null.
HasValue32x.HasValue
HasValueProperty48NotHasValue | HasValueExpression that uses Nullable<T>.HasValue property.
IsNotNull64x is not null
IsPattern76IsNull | NotIsNull | IsNotNullExpression that uses pattern syntax.
CheckingNotNull106NotEqualsToNull | NotIsNull | HasValue | IsNotNullExpression that checks whether an expression is not null.
All127CheckingNull | CheckingNotNullAll null check styles.