When trying to access vlues of an array (or dictionary) inside a dynamic object, I get the error:
DynamicExpresso.Exceptions.ParseException : No applicable indexer exists in type 'Object' (at index 7).
[Test]
public void Get_value_of_a_nested_array()
{
dynamic dyn = new ExpandoObject();
dyn.Sub = new int[] {42};
var interpreter = new Interpreter().SetVariable("dyn", (object)dyn);
Assert.AreEqual(dyn.Sub[0], interpreter.Eval("dyn.Sub[0]"));
}
This is also mentioned on Stack Overflow, https://stackoverflow.com/questions/53040955/how-can-i-use-dynamic-variables-with-anonymous-types
When trying to access vlues of an array (or dictionary) inside a dynamic object, I get the error:
DynamicExpresso.Exceptions.ParseException : No applicable indexer exists in type 'Object' (at index 7).
This is also mentioned on Stack Overflow, https://stackoverflow.com/questions/53040955/how-can-i-use-dynamic-variables-with-anonymous-types