Table of Contents

Interface IVariable

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

Represents a variable (name/type pair).

public interface IVariable : ISymbol
Inherited Members

Properties

IsConst

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

bool IsConst { get; }

Property Value

bool

Name

Gets the name of the variable.

string Name { get; }

Property Value

string

Type

Gets the type of the variable.

IType Type { get; }

Property Value

IType

Methods

GetConstantValue(bool)

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

object? GetConstantValue(bool throwOnInvalidMetadata = false)

Parameters

throwOnInvalidMetadata bool

Returns

object