WasmGlobal Class

A global (a global address).

public abstract class WasmGlobal : WasmExtern
Inheritance
WasmExtern WasmGlobal

Properties

NameDescription
KindGets the kind of the value.
TypeGets the type of the global.

Gets the kind of the value.

public override WasmExternKind Kind { get; }

Property value

WasmExternKind

Type

Gets the type of the global.

public abstract WasmGlobalType Type { get; }

Property value

WasmGlobalType

Methods

NameDescription
Get()Reads the value (global_read).
Set(WasmValue)Writes the value (global_write).

Get()

Reads the value (global_read).

public abstract WasmValue Get()

Returns

WasmValue

Set(WasmValue)

Writes the value (global_write).

public abstract void Set(WasmValue value)

Parameters

value WasmValue

Exceptions

WasmTypeMismatchException
The global is immutable, or the value does not match its type.