NET:LavishScriptAPI.LavishScriptObject.GetValue

From Lavish Software Wiki
Jump to navigation Jump to search

Overview

Performs the equivalent of Object.ToString, converting the result to the desired type.

Reference Library

Lavish.InnerSpace.dll

Fully Qualified Name

LavishScriptAPI.LavishScript.Objects.GetObject

Declaration

public T GetValue<T>()

Parameters

None

Return Value

  • T
The converted result of LavishScript's "ToString" operation on the LavishScript object.

Examples

Frame.Lock();
LavishScriptObject Obj = LavishScript.Objects.GetObject("LavishScript");
if (Obj == null)
{
    InnerSpace.Echo("object not found");
}
else
{
    /* "LavishScript" object's ToString value is its version number, which follows the form of a typical float */
    float Version = Obj.GetValue<float>();
    InnerSpace.Echo("LavishScript Version " + Version.ToString());
}
Frame.Unlock();

See Also