Show / Hide Table of Contents

Class VmArray

Represents an array of values in the virtual machine.

Inheritance
object
VmArray
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VM.Core.Instructions
Assembly: VM.dll
Syntax
public class VmArray

Constructors

VmArray(int, string)

Creates a new array of specified size.

Declaration
public VmArray(int size, string elementType = "any")
Parameters
Type Name Description
int size

Number of elements

string elementType

Type description of elements

Properties

ElementType

Gets the element type of the array

Declaration
public string ElementType { get; }
Property Value
Type Description
string

Length

Gets the length of the array

Declaration
public int Length { get; }
Property Value
Type Description
int

Methods

Get(int)

Gets an element at the specified index.

Declaration
public VmValue Get(int index)
Parameters
Type Name Description
int index
Returns
Type Description
VmValue
Exceptions
Type Condition
VmException

Thrown when index is out of bounds

Set(int, VmValue)

Sets an element at the specified index.

Declaration
public void Set(int index, VmValue value)
Parameters
Type Name Description
int index
VmValue value
Exceptions
Type Condition
VmException

Thrown when index is out of bounds

ToString()

Returns string representation of array contents

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
In this article
Back to top Generated by DocFX