Represents a typed value that can be defined, defined to null, or undefined. Used to represent default values, for instance DefaultValue, or attribute arguments.
Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public readonly struct TypedConstant : IExpression, IHasType, IEquatable<TypedConstant>
Properties
Name | Description |
---|---|
IsArray | |
IsInitialized | Gets a value indicating whether the Value has been specified (including when it is set to |
IsNullOrDefault | Gets a value indicating whether the value is |
RawValue | Gets the raw value of the TypedConstant. If IsArray is |
Type | Gets the type of the value. This is important if the type is an enum, because in this case, if the enum type is not compile-time, Value is set to the underlying integer value. |
Value | Gets the Value for non-array types. For array types, get an array of a primitive type (e.g. |
Values |
Methods
Operators
Name | Description |
---|---|
operator ==(TypedConstant, TypedConstant) | |
operator !=(TypedConstant, TypedConstant) |