"using namespace;" statements in C# query file
Is there any reason LINQPad doesn't support
in a C# statement/program file to import a namespace? That seems like the obvious way to do it, familiar to all C# programmers.
I thought it must have been asked before, but searching this forum for "using namespace" didn't return anything relevant.
using My.Namespace.Name;
in a C# statement/program file to import a namespace? That seems like the obvious way to do it, familiar to all C# programmers.
I thought it must have been asked before, but searching this forum for "using namespace" didn't return anything relevant.
Comments
using
statement(s) at the start of a query you get the option to "Move 'using' directives into Query Properties?".This is kind of a "hidden" feature and it would be more obvious if the "using"s simply stayed in the main query window, but OK, this works.
My medium and long-term plan is for LINQPad to offer compatibility with the Roslyn scripting library, which allows for using directives in the script. This will give the best experience, because the using directives will be valid syntax and so LINQPad won't have to fight the compiler.
The challenge is to figure out how to do this without breaking compatibility with existing scripts.