From the course: LINQPad Essential Training

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Explore the programs editor

Explore the programs editor - LINQ Tutorial

From the course: LINQPad Essential Training

Explore the programs editor

- [Instructor] The third editor type is the program editor. Use this editor when you want to add additional classes or methods to your experiment. To be clear, you'll write these classes and methods in this editor. It's not the same as calling them from another existing .NET assemblies. You notice that when I pick program from the list, that LINQPad stubbed in some boilerplate code. It wrote this main method for me. And then it's got a comment down here saying define other methods, classes and namespaces here. When I run this query, LINQPad will run the code that's in the main method and it's here that I can work with the other methods. Here's an example. I wrote a method on line 10 through 13 called GetMagicNumber and I'm calling that here on line three in the main method. So I'm calling GetMagicNumber, adding 200 to the results and storing it in this variable, and then I'm outputting that result to the console, like…

Contents