NullCheckStyles Enum
Namespace: Roslynator.CSharp
Assembly: Roslynator.CSharp.dll
Specifies a null check.
[Flags]
public enum NullCheckStyles
Inheritance
Object → ValueType → Enum → NullCheckStyles
Attributes
Fields
Name | Value | Combination of | Summary |
---|---|---|---|
None | 0 | No null check specified. | |
EqualsToNull | 1 | x == null | |
NotEqualsToNull | 2 | x != null | |
ComparisonToNull | 3 | EqualsToNull | NotEqualsToNull | Expression that uses equality/inequality operator. |
IsNull | 4 | x is null | |
NotIsNull | 8 | !(x is null) | |
NotHasValue | 16 | !x.HasValue | |
CheckingNull | 21 | EqualsToNull | IsNull | NotHasValue | Expression that checks whether an expression is null. |
HasValue | 32 | x.HasValue | |
HasValueProperty | 48 | NotHasValue | HasValue | Expression that uses Nullable<T>.HasValue property. |
IsNotNull | 64 | x is not null | |
IsPattern | 76 | IsNull | NotIsNull | IsNotNull | Expression that uses pattern syntax. |
CheckingNotNull | 106 | NotEqualsToNull | NotIsNull | HasValue | IsNotNull | Expression that checks whether an expression is not null. |
All | 127 | CheckingNull | CheckingNotNull | All null check styles. |