Hi André!
I’m not really sure that’s actually doable. First of all you’d have to actually somehow reference that interface from your own assembly, and the closure type, plus the main issue is that I’d expect the compiler to just fail to compile entirely when using that closure type, since its name is not valid in the C# syntax. I’m not sure whether that API allows you to compile code that uses compiler-generated types like that. Also, small note, that specific API you mentioned is now deprecated, you should use the one from the `CSharpCodeProvider.CompileAssemblyFromSource` class.
That said, even if that worked, I’m not really sure it’d even be worth the effort, considering that it’d probably end up requiring more work than the actual solution with IL emit proposed in this blog post.
Of course though, you could always try it out yourself if you’re just interested in it for the learning opportunity, that’s never a bad thing!