```
public class TestItem
{
public string Str { get; set; }
}
class Program
{
static void Main(string[] args)
{
using (var runtime = new V8Runtime())
using (var engine = runtime.CreateScriptEngine())
{
engine.AddHostObject("test", new TestItem());
string scriptCode = "test";
V8Script compiledScript = runtime.Compile(scriptCode);
object result = engine.Evaluate(scriptCode); //TestItem type
object resultFromCompiled = engine.Evaluate(compiledScript); // HostObject type
if (!result.Equals(resultFromCompiled)) // Different type of objects.
throw new ApplicationException();
}
Console.ReadLine();
}
}
```
Comments: Fixed in [Version 5.3.7](https://clearscript.codeplex.com/SourceControl/changeset/6c75e44d6b0530f56ee6e4ea96a9acdba65af6fe).
public class TestItem
{
public string Str { get; set; }
}
class Program
{
static void Main(string[] args)
{
using (var runtime = new V8Runtime())
using (var engine = runtime.CreateScriptEngine())
{
engine.AddHostObject("test", new TestItem());
string scriptCode = "test";
V8Script compiledScript = runtime.Compile(scriptCode);
object result = engine.Evaluate(scriptCode); //TestItem type
object resultFromCompiled = engine.Evaluate(compiledScript); // HostObject type
if (!result.Equals(resultFromCompiled)) // Different type of objects.
throw new ApplicationException();
}
Console.ReadLine();
}
}
```
Comments: Fixed in [Version 5.3.7](https://clearscript.codeplex.com/SourceControl/changeset/6c75e44d6b0530f56ee6e4ea96a9acdba65af6fe).