include another .cs file(s) in a .linq file
in "C# Program" mode:
// Define other methods and classes here
#include MyClass.cs // <--- something like this
So that we can have MyClass defined in another file (MyClass.cs) and just include it instead of copy&pasting the code. This would allow better code separation and re-use.
This is now available in the LINQPad 6 beta:
Dan Puza commented
Maxwell Bloch commented
Integrate this with the suggested social feature.
Use comment pre-parsing to implement
// #include localFile.cs
// #include gist:12345678
Ditto that, this thing is almost the killer app, just gets messing having to dup everything in the same file
YES... too long since I suggested this too...
Of course for VB, SQL, etc. too...
The best way to do it is in the query preferences add one more tab to delclare what include files (.linq) this snippet process...
Also a section in this tab to declare some .linq files that are included in all the projects (by type, of course... We dont want to include a C# file in a SQL snippet... that is another war...)
yep, definately what i need!
I want to write everything in linqpad!