【问题标题】:c# Getting file from projectc# 从项目中获取文件
【发布时间】:2015-06-16 01:20:59
【问题描述】:

我有一个包含很多项目的解决方案,我只是将存档放在下一个路径解决方案 -> Project('Functions') -> Folder('Pantallas') -> File('markercluster.js')

现在我想引用这个存档,获取应用程序当前位置的路径加上“Functions/Pantallas/markercluster.js”

我该怎么做?

【问题讨论】:

标签: c# path archive


【解决方案1】:

我得到了executablePath,然后去掉了.exe

string exePath = Application.ExecutablePath;

然后在我的情况下(因为我的 .exe 名称长度为 21 个字符)

 exePath = exePath.Substring(0,exePath.Length-21);

【讨论】:

    猜你喜欢
    • 2020-12-13
    • 2011-09-11
    • 1970-01-01
    • 1970-01-01
    • 2012-05-23
    • 1970-01-01
    • 1970-01-01
    • 2011-08-08
    • 1970-01-01
    相关资源
    最近更新 更多