Tuesday, November 18, 2008

LINQ : LINQ samples and ObjectDumper

There's a good selection of LINQ samples here. I ran up most of them in LINQPad.

However, some of these samples use a method called ObjectDumper (which does much the same job as object.Dump() in LINQPad).

The source for ObjectDumper can be found in this zip file. Save the files in an ObjectDumper directory somewhere and load them as a Project under Visual Studio. (Note that the sample is for VS 2008 but I had no problems doing this with VS 2005. Just remember to click on the .csproj to open the project and not the .sln!).

Then build the project which will create a .dll and add this .dll to the LINQPad "snippet" using "Advanced Properties" (F4)", then "Add" and then "Browse" to where you created the .dll.

Enjoy!

No comments: