Thank you so much. Works like a charm. And seems to improve performance over the
Remaining question: Do I have to
The ClearScript code seems to do that sometimes with objects returned from
Action approach I presented above. (Did not measure performance, though.)Remaining question: Do I have to
((IDisposable)action).Dispose (); the action object (i.e. the ScriptItem) at the end of forEach?The ClearScript code seems to do that sometimes with objects returned from
Evaluate, and it is not entirely clear to me when that is necessary.