Table of Contents

Class CodeConstant

Namespace
LinqToDB.CodeModel
Assembly
linq2db.Tools.dll

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

type IType
value object
targetTyped bool

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

bool

Type

Constant type.

public CodeTypeToken Type { get; }

Property Value

CodeTypeToken

Value

Constant value.

public object? Value { get; }

Property Value

object