我是靠谱客的博主 会撒娇音响,这篇文章主要介绍C# 将数据写入当前程序安装目录某文件夹下,现在分享给大家,希望可以做个参考。


public static string GetXmlFullPath(string strPath)
{
string filePath = GetPhysicalPath();
if (filePath.IndexOf(":") > 0)
{
return filePath;
}
else
{
return null;
}
}
//获取配置文件的物理路径
public static string GetPhysicalPath()
{
//获得当前程序运行的物理路径比如F:XFU.NSQSprojectApplication
string filePath = HttpContext.Current.Request.PhysicalApplicationPath;
int n = filePath.IndexOf("获取程序安装文件夹下某个文件名AA"); ;
filePath = filePath.Substring(0,n) + "获取程序安装文件夹下某个文件名AA" + "\文件夹AA下的某个xml文件(用来存储相关信息)";
return filePath;
}


<wbr></wbr>

最后

以上就是会撒娇音响最近收集整理的关于C# 将数据写入当前程序安装目录某文件夹下的全部内容,更多相关C#内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(59)

评论列表共有 0 条评论

立即
投稿
返回
顶部