Table of Contents

Class SpecializedField

Namespace
ICSharpCode.Decompiler.TypeSystem.Implementation
Assembly
ICSharpCode.Decompiler.dll

Represents a specialized IField (field after type substitution).

public class SpecializedField : SpecializedMember, IField, IMember, IEntity, ICompilationProvider, INamedElement, IVariable, ISymbol
Inheritance
SpecializedField
Implements
Inherited Members
Extension Methods

Constructors

SpecializedField(IField, TypeParameterSubstitution)

public SpecializedField(IField fieldDefinition, TypeParameterSubstitution substitution)

Parameters

fieldDefinition IField
substitution TypeParameterSubstitution

Properties

IsConst

Gets whether this variable is a constant (C#-like const).

public bool IsConst { get; }

Property Value

bool

IsReadOnly

Gets whether this field is readonly.

public bool IsReadOnly { get; }

Property Value

bool

IsVolatile

Gets whether this field is volatile.

public bool IsVolatile { get; }

Property Value

bool

ReturnTypeIsRefReadOnly

Gets whether the field type is 'ref readonly'.

public bool ReturnTypeIsRefReadOnly { get; }

Property Value

bool

Methods

GetConstantValue(bool)

If this field is a constant, retrieves the value. For parameters, this is the default value.

public object GetConstantValue(bool throwOnInvalidMetadata)

Parameters

throwOnInvalidMetadata bool

Returns

object