Vixen
02b45cc4
csharp
public sealed class SourceEnumMemberSymbol

A member of an enum: a constant of the enum's own type.

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

Fields and properties (9)

  • public int Ordinal

    Declaration order. The value continues from the previous member, C-style.

  • public override string Name
  • public override Symbol? ContainingSymbol
  • public override SyntaxNode DeclaringSyntax
  • public override TypeSymbol Type
  • public override bool IsConst
  • public override bool IsReadOnly
  • public override bool IsStatic
  • public override object? ConstantValue

    The member's value: its initializer evaluated as a constant expression, or the previous member's value plus one — A, B = 5, C makes C six. An initializer that is not a compile-time integer is RVN2094; a cycle (A = B, B = A) is a circular-definition error. Both fall back to 0 so downstream phases still see a well-typed constant.

Used by (2)

  • SemanticModelVixen.Raven
  • SourceNamedTypeSymbolVixen.Raven