Table of Contents

Class VBStringValue

Namespace
RDCore.SDK.Model.Values.Intrinsic
Assembly
RDCore.SDK.dll

Represents and holds a String value.

public record VBStringValue : VBTypedValue, IEquatable<VBRuntimeEntity>, IEquatable<VBTypedValue>, IVBTypedValue<VBStringValue, string>, IEquatable<IVBTypedValue<VBStringValue, string>>, IEquatable<VBStringValue>
Inheritance
VBStringValue
Implements
Derived
Inherited Members

Constructors

VBStringValue(Symbol)

Creates a new VBStringValue associated with the specified symbol.

public VBStringValue(Symbol symbol)

Parameters

symbol Symbol

The symbol to be associated with this value.

Fields

NaN

Defined in MS-VBAL 5.5.1.2.4 Let-coercion to and from String.

public const string NaN = "1.#IND"

Field Value

string

Remarks

Does not appear to be actually implemented in MS-VBA. This token is actually specified as "-1.#IND", but given the apparent typographical error in the negative infinity specification, the specified negation prefix present in this token is deemed to have been intended for the negative infinity token instead.

NegativeInfinity

Defined in MS-VBAL 5.5.1.2.4 Let-coercion to and from String.

public const string NegativeInfinity = "-1.#INF"

Field Value

string

Remarks

Does not appear to be actually implemented in MS-VBA, but is explicitly specified as having the literal same string value as PositiveInfinity. Given the presence of transcription errors elsewhere and that this looks like one, the token is defined here with a negation prefix that distinguishes the two infinity types, as was probably intended - inferred from the presence of separate specifications for positive and negative infinity.

PositiveInfinity

Defined in MS-VBAL 5.5.1.2.4 Let-coercion to and from String.

public const string PositiveInfinity = "1.#INF"

Field Value

string

Remarks

Does not appear to be actually implemented in MS-VBA.

Zero

public const string Zero = "0"

Field Value

string

Properties

BoxedValue

Gets the boxed (object) underlying managed value.

public override object BoxedValue { get; }

Property Value

object

Remarks

👉 This member is provided as a non-generic convenience for contexts where the type is unknown. Use the generic ITypedValue<T> whenever possible instead.

Length

public virtual int Length { get; }

Property Value

int

Size

The allocated size (in bytes) of this value.

public override int Size { get; }

Property Value

int

VBNullString

Gets the static value associated with VBNullString.

public static VBStringValue VBNullString { get; }

Property Value

VBStringValue

Value

Gets the underlying managed value corresponding to this typed value.

public string Value { get; init; }

Property Value

string

ZeroLengthString

Gets the static value associated with VBEmptyString.

public static VBStringValue ZeroLengthString { get; }

Property Value

VBStringValue

Methods

Equals(IVBTypedValue<VBStringValue, string>?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IVBTypedValue<VBStringValue, string>? other)

Parameters

other IVBTypedValue<VBStringValue, string>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WithValue(string?)

public virtual VBStringValue WithValue(string? value)

Parameters

value string

Returns

VBStringValue