Show / Hide Table of Contents

Interface IValue

Represents a value in the virtual machine's type system.

Namespace: VM.Core.ValueTypes
Assembly: VM.dll
Syntax
public interface IValue
Remarks

Provides common operations and type conversions for all value types in the VM.

Properties

Raw

Gets the raw underlying value as an object.

Declaration
object Raw { get; }
Property Value
Type Description
object

TypeName

Gets the type name of this value.

Declaration
string TypeName { get; }
Property Value
Type Description
string

Methods

AsBool()

Converts the value to a boolean.

Declaration
bool AsBool()
Returns
Type Description
bool

The boolean representation of the value.

AsFloat()

Converts the value to a floating-point number.

Declaration
float AsFloat()
Returns
Type Description
float

The converted float value.

Exceptions
Type Condition
InvalidCastException

Thrown when conversion is not possible.

AsInt()

Converts the value to an integer.

Declaration
int AsInt()
Returns
Type Description
int

The converted integer value.

Exceptions
Type Condition
InvalidCastException

Thrown when conversion is not possible.

AsString()

Converts the value to a string.

Declaration
string AsString()
Returns
Type Description
string

The string representation of the value.

In this article
Back to top Generated by DocFX