LINQPad script directory?

后端 未结 2 519
Happy的楠姐
Happy的楠姐 2021-02-01 12:42

Does anyone know how to get hold of the path to the directory where the LINQPad script file (.linq) resides?

Or to the script itself for that matter.

Note that I

相关标签:
2条回答
  • 2021-02-01 13:30

    I presume you mean programatically and not through the UI itself.

    The path to the linq file directory is held in

    %APPDATA%\LINQPad\querypath.txt

    0 讨论(0)
  • 2021-02-01 13:47

    I've just added a feature to address this. You can test it now by downloading the 2.27.1 or 4.27.1 beta build.

    To get the current query's folder, use the following expression:

    Path.GetDirectoryName (Util.CurrentQueryPath)
    
    0 讨论(0)
提交回复
热议问题