复制代码
1
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22public 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#内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复