Enumerable.Contains is an extension method, and extension methods are not allowed by the mini-compiler that is used at run time. (Extension methods depend on using directives that are not saved. They could have been, but I think it was a little painful.) This includes using dynamic arguments for extension methods as well as using extension methods as their βtargetβ .
Just specify the extension method directly:
var result = Enumerable.Contains(ie, d);
source share