Share via


TypedConstant Struct

Definition

Represents a constant value used as an argument to a custom attribute.

public value class TypedConstant : IEquatable<Microsoft::CodeAnalysis::TypedConstant>
public struct TypedConstant : IEquatable<Microsoft.CodeAnalysis.TypedConstant>
public readonly struct TypedConstant : IEquatable<Microsoft.CodeAnalysis.TypedConstant>
type TypedConstant = struct
Public Structure TypedConstant
Implements IEquatable(Of TypedConstant)
Inheritance
TypedConstant
Implements

Properties

IsNull

True if the constant represents a null reference.

Kind

The kind of the constant.

Type

Returns the ITypeSymbol of the constant, or null if the type can't be determined (error).

Value

The value for a non-array constant.

Values

The value for a TypedConstant array. Returns a defaultImmutableArray if null was passed as the array value; IsNull can be used to check for this.

Methods

Equals(Object)
Equals(TypedConstant)
GetHashCode()

Extension Methods

ToCSharpString(TypedConstant)

Returns the System.String that represents the current TypedConstant.

ToVisualBasicString(TypedConstant)

Returns the System.String that represents the current TypedConstant.

Applies to