Vixen
02b45cc4
csharp
public static class ConstantEvaluator

Evaluates a bound expression to a compile-time value, or null when it has none. This is what gives an enum member's initializer and a const field's initializer their values — C = B, D = 2 + 3, E = -1 — where reading ConstantValue alone only sees literals and const-field references.

No guide page documents this yet — the page shows what the code says about itself.

Methods (1)

  • public static object? Evaluate(BoundExpression expression)

    The expression's compile-time value, or null when it is not a constant.

Used by (3)

  • BinderVixen.Raven
  • SourceEnumMemberSymbolVixen.Raven
  • SourceFieldSymbolVixen.Raven