Class CodeConstant
Constant expression. E.g. literal (including null
literal) or enumeration value.
public sealed class CodeConstant : ICodeExpression, ICodeElement
- Inheritance
-
CodeConstant
- Implements
- Extension Methods
Constructors
CodeConstant(IType, object?, bool)
public CodeConstant(IType type, object? value, bool targetTyped)
Parameters
Properties
TargetTyped
Indicates that constant type is constrained by context (e.g. used in assignment to property of specific type) and code generator could use it to ommit type information.
public bool TargetTyped { get; }
Property Value
Type
Constant type.
public CodeTypeToken Type { get; }
Property Value
Value
Constant value.
public object? Value { get; }