Show / Hide Table of Contents

Class StringValue

Represents a string value in the virtual machine.

Inheritance
object
StringValue
Implements
IValue
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VM.Core.ValueTypes
Assembly: VM.dll
Syntax
public class StringValue : IValue
Remarks

Provides string-specific conversions and operations.

Constructors

StringValue(string)

Represents a string value in the virtual machine.

Declaration
public StringValue(string value)
Parameters
Type Name Description
string value
Remarks

Provides string-specific conversions and operations.

Properties

Raw

Gets the raw underlying value as an object.

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

TypeName

Gets the type name of this value.

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

Methods

AsBool()

Converts the value to a boolean.

Declaration
public bool AsBool()
Returns
Type Description
bool

The boolean representation of the value.

AsFloat()

Converts the value to a floating-point number.

Declaration
public 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
public 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
public string AsString()
Returns
Type Description
string

The string representation of the value.

ToString()

Returns the underlying string value.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Implements

IValue
In this article
Back to top Generated by DocFX