Dynamic Expresso: Unknown identifier IDictionary

102 Views Asked by At

I am trying to get dynamic expresso to interpret this line of code:

(((IDictionary<string, object>)o)["Diesel % in oil"].ToString().StartsWith("<") ? ((IDictionary<string, object>)o)["Diesel % in oil"].ToString().Replace("<", String.Empty) : ((IDictionary<string, object>)o)["Diesel % in oil"].ToString())

When it executes I get the following exception Unknown identifier 'IDictionary' (at index 3).

I am testing for a "<" at the start and then replacing all instances of the "<" (excuse the terrible key name - out of my control that one!).

I have tried adding typeof(System.Collections.Generic.IDictionary<string, object>) as a reference to the interpreter object, but no joy.

I'm sure I'm missing something simple.

0

There are 0 best solutions below