Class DefaultVariable
- Namespace
- ICSharpCode.Decompiler.TypeSystem.Implementation
- Assembly
- ICSharpCode.Decompiler.dll
Default implementation of IVariable.
public sealed class DefaultVariable : IVariable, ISymbol
- Inheritance
-
DefaultVariable
- Implements
- Inherited Members
Constructors
DefaultVariable(IType, string)
public DefaultVariable(IType type, string name)
Parameters
DefaultVariable(IType, string, bool, object)
public DefaultVariable(IType type, string name, bool isConst = false, object constantValue = null)
Parameters
Properties
IsConst
Gets whether this variable is a constant (C#-like const).
public bool IsConst { get; }
Property Value
Name
Gets the name of the variable.
public string Name { get; }
Property Value
SymbolKind
This property returns an enum specifying which kind of symbol this is (which derived interfaces of ISymbol are implemented)
public SymbolKind SymbolKind { get; }
Property Value
Type
Gets the type of the variable.
public IType Type { get; }
Property Value
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