When Written: June 2012
The free LINGpad not only allows you to test LINQ to XML queries as here but will also run C# and VB code for testing
When trying to fumble my way around code I find myself creating several projects in Visual Studio just to test them out, I always start their names with ‘test’ so that I know I can delete them later, but the other day I came across a useful tool that allows you to run code written in C# VB and F# as well as LINQ along with code hinting (in the paid for version ) and see the results immediately. With this tool, LINQPad ( www.linqpad.com ), it is great to be able to test code and queries and check the output before committing them to your project.
Don’t think that it is just for testing out LINQ queries, though, as it will do much more than that and I think that it is worth paying the $39 to get the version with code autocompletion. Using LINQPad you can connect to a web service and then build and test a LINQ query and view the output in the results window. You can even do the same to test SQL queries against a database or write code in any one of the supported languages.
There are numerous samples provided so right mouse clicking on your data connection in LINQPad will offer you several query types based on this data which you can then edit further to get you started. LINQpad is just one of those useful utilities like Notepad++ that can make solving that coding problem so much quicker.
Article by: Mark Newton
Published in: Mark Newton