Reputation: 2323
Do you know how to declare variables in LINQPad in order to hold the query result and use it later in multiply queries?
Thanks!
Upvotes: 22
Views: 12691
Reputation: 827862
Just select C# or VB Statements, and you will be able to write variable declarations.
To view the content of your variables, you can use the Dump extension method available on all types:
var test = "Test String";
test.Dump(); // the content is shown in the output
Or you can use the Console.Write
method.
If you want to include method or class declarations within a LinqPad file, select C# or VB Program.
Upvotes: 50