Sorry about that, here's the code:
------------------------------------------------------------------------------
using System;
using Microsoft.JScript;
using Microsoft.JScript.Vsa;
namespace VPDBUtils
{
public class JScriptEvaluator
{
private static VsaEngine vsaEngine;
public static void Initialize()
{
vsaEngine = VsaEngine.CreateEngine();
}
public static void Close()
{
if (vsaEngine != null)
{
vsaEngine.Close();
}
}
private static object EvaluateString(string sStringToEvaluate)
{
return Eval.JScriptEvaluate(sStringToEvaluate, vsaEngine);
}
internal static double EvaluateStringAsDouble(string sStringToEvaluate)
{
return System.Convert.ToDouble(EvaluateString(sStringToEvaluate));
}
}
}