IOperation.ConstantValue Property

Definition

If the operation is an expression that evaluates to a constant value, HasValue is true and Value is the value of the expression. Otherwise, HasValue is false.

public Microsoft.CodeAnalysis.Optional<object> ConstantValue { get; }
public Microsoft.CodeAnalysis.Optional<object?> ConstantValue { get; }

Property Value

Applies to