LINQPad
If you are interested in learning LINQ and/or refreshing your knowledge, installation of the free LINQPad is highly recommended.
An apt description comes from the LINQ Secrets Revealed: Chaining and Debugging
article on Simple Talk:
LINQPad is one of those rare applications that is elegant, powerful, and well-designed. As soon as you start using it you know it is “just right”.
Remember back when you discovered the awesome power of Visual Studio; LINQPad is like that, too. ... LINQPad is a sandbox/IDE for .NET languages
(C#, VB, SQL, F#) that lets you develop code without all the overhead of creating solutions and projects required in Visual Studio.
There is no real integration of the 101 LINQ samples on this site and LINQPad but for the ones that work with self-contained collections, i.e. do not use Products/Customers/Orders/Suppliers
classes, testing an answer requires little more than a copy & paste:
- Open LINQPad and if necessary set the Language dropdown to "C# Statement(s)"
- Copy & paste the collection definition
- Enter the code necessary to answer question directly into the Query box, or copy from roundabout
- Append ".Dump()" to the output variable
- Press F5 or the green Execute arrow
For the many samples referencing the Products/Customers/Orders/Suppliers the steps will be somewhat more complicated, at least the first time:
- Open LINQPad and in a new Query tab set the Language dropdown to "C# Program"
- Copy & paste the collection definition and your answer code into the provided Main method
- Append ".Dump()" to the output variable
- Underneath closing block of Main() paste the code contents of LINQ custom object data
- Press F5 or the green Execute arrow
After confirming successful execution it makes sense to save the Query as a permanent .linq file and then for each future test replace the contents of Main() as appropriate.