tag:blogger.com,1999:blog-6966085462464595987.post2089991471631933289..comments2023-06-08T08:06:44.697+03:00Comments on Stuff: LINQ Expressions and Reflection.Emit: an uncomfortable unionUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6966085462464595987.post-18713613655145743552016-12-09T04:11:38.221+02:002016-12-09T04:11:38.221+02:00I've similarly found it frustrating that the a...I've similarly found it frustrating that the authors of Linq Expressions took it 99% of where it needed to go to be a totally general replacement for method body IL emission, but stopped annoyingly short. I was also annoyed to find that calling into a MethodBuilder is similarly prevented by something so trivial as generics validation, though it's hard to know for sure without getting past that error. I don't see any reason it wouldn't work though, because an Emit(OpCodes.Call, ...) works just fine to a MethodBuilder.<br /><br />Now that everything is open source, we could probably fix it I suppose; I'd be more more inclined to if I could actually justify the time as part of my current client work, but it's not like I can tell my client, "oh, you just need to wait until they release the next .NET runtime." :-)<br /><br />Your friend in the misery of other people's frameworks,<br /><br />-NateNathan Allanhttps://www.blogger.com/profile/16536035662769805976noreply@blogger.com