Table of Contents

Enum NullCoalescingKind

Namespace
ICSharpCode.Decompiler.IL
Assembly
ICSharpCode.Decompiler.dll

Kind of null-coalescing operator. ILAst: if.notnull(valueInst, fallbackInst) C#: value ?? fallback

public enum NullCoalescingKind

Fields

Nullable = 1

Both ValueInst and FallbackInst are of type Nullable{T}.

Semantics: equivalent to "valueInst.HasValue ? valueInst : fallbackInst", except that valueInst is evaluated only once.

NullableWithValueFallback = 2

ValueInst is Nullable{T}, but FallbackInst is non-nullable value type.

Semantics: equivalent to "valueInst.HasValue ? valueInst.Value : fallbackInst", except that valueInst is evaluated only once.

Ref = 0

Both ValueInst and FallbackInst are of reference type.

Semantics: equivalent to "valueInst != null ? valueInst : fallbackInst", except that valueInst is evaluated only once.