Home

LINQPad classes

Hello,
Does exist any reference guide to LINQPad's classes?
Using C# statements in LINQPad I need to refer to the LINQPad's main window (form). How can I achieve that?
Best regards,
Veroslav

Comments

  • You can Dump any WPF or Windows Forms control, and LINQPad will display it in the output area. Is that what you want to do?
  • Hello,
    Not exactly - I'd need to do something like this:
    System.Windows.Forms.Screen.FromControl(this).Dump();
    where this means the Linqpad itself - i.e. need to get the screen where Linqpad is actually displayed at (on multi-display system)...
  • You can't easily access the LINQPad host window as a Form because it runs in another application domain. (And as of the latest beta, it runs in an entirely separate process).

    Your best option might be to find the LINQPad.exe process and use Win32 functions to access the Window. What is it that you want to do in particular?
  • Hello,
    I understand. Thanks. I'm writing a helpdesk frontend and I've been using LINQPad for fast prototyping of frontend features. It's an amazing tool.
    In this particular case I wanted to develop a functionality that will take screenshot of the display where the frontend is actually diplayed on, save it as jpg and attach it to helpdesk request. The target systems are usually equipped with two screens, so I want to identify that one where the app is actually shown at.
    I wanted to save some rows of testing code so I though I could get the screen where LINQPad is displayed on :-) But now I will create a dummy form and get its screen instead.
    BTW... when I type in LINQPad C# Statements window the "Linqpad" class name itself followed by a dot, I get Intellisense hints with many interesting methods, properties etc. - are those somewhere documented?
  • The additional methods and types in LINQPad are documented in this StackOverflow answer:

    http://stackoverflow.com/questions/3555317/linqpad-extension-methods/3562160#3562160
Sign In or Register to comment.