Skip to content

Evaluate methods names as delegates : (calls to Array.ConvertAll() failing) #98

@mgwilliam

Description

@mgwilliam

When I try the following code:

var evaluator = new ExpressionEvaluator
{
    Variables = new Dictionary<string, object>()
    {
        {"values", "1,2,3,4,5,6,-1"}
    }
};

var script = "var numbers = Array.ConvertAll(values.Split(','), Int32.Parse); return numbers.Min();";

return evaluator.ScriptEvaluate(script);

...it fails with the error:

[System.Array] object has no Method named "ConvertAll".

Should this work?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions