Does anyone have a complete list of LINQPad extension methods and methods, such as
.Dump()
SubmitChanges()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
LINQPad defines two extension methods (in LINQPad.Extensions), namely
Dump()andDisassemble().Dump()writes to the output window using LINQPad’s output formatter and is overloaded to let you specify a heading:You can also specify a maximum recursion depth to override the default of 5 levels:
Disassemble() disassembles any method to
IL, returning the output in a string:In addition to those two extension methods, there are some useful static methods in LINQPad.Util. These are documented in autocompletion, and include:
LINQPad also provides the HyperLinq class. This has two purposes: the first is to display ordinary hyperlinks:
You can combine this with
Util.HorizontalRun:Result:
The second purpose of HyperLinq is to dynamically build queries:
You can also write your own extension methods in LINQPad. Go to ‘My Queries’ and click the query called ‘My Extensions’. Any types/methods that define here are accessible to all queries:
In 4.46(.02) new classes and methods have been introduced:
Additionally, the Hyperlinq class now supports an Action delegate that will be called when you click the link, allowing you to react to it in code and not just link to external webpages.
DumpContaineris a class that adds a block into the output window that can have its contents replaced.NOTE! Remember to
.Dump()theDumpContaineritself in the appropriate spot.To use:
OnDemandis an extension method that will not output the contents of its parameter to the output window, but instead add a clickable link, that when clicked will replace the link with the.Dump()ed contents of the parameter. This is great for sometimes-needed data structures that is costly or takes up a lot of space.NOTE! Remember to
.Dump()the results of callingOnDemandin the appropriate spot.To use it:
Util.ProgressBaris a class that can show a graphical progressbar inside the output window, that can be changed as the code moves on.NOTE! Remember to
.Dump()the Util.ProgressBar object in the appropriate spot.To use it: