How to Get Local ToDump() Working in a Query?
Hi, I'm having trouble getting ToDump working when defining it within a query.
I'm using Linqpad 7.4.9 (x64) and the following local ToDump isn't working for me, but will if I put it in MyExtensions Am I missing something?
5.Dump(); static object ToDump(object o) { return 6; }
Comments
Does not work with C# Statements, so change your script to be C# Program.
I swore I tried that too, but apparently I did not . I may have tried other things simultaneously and missed it. This does work for me, thank you, sgmoore!
This is a great feature, btw!! I would consider adding that detail to the blurb in the documentation. As it is now, the "any query" implied to me that it should work.
Thanks - I'll update the documentation.