【转】C#获取当前路径7种方法
2024-08-25 08:10:01
webform
var s = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; //C盘 IIS路径
var s1 = System.Environment.CurrentDirectory; //同上
var s2 = System.IO.Directory.GetCurrentDirectory();//同上
var s3 = System.AppDomain.CurrentDomain.BaseDirectory; //当前项目根目录
var s4 = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase; //同上
winform System.Windows.Forms.Application.StartupPath
System.Windows.Forms.Application.ExecutablePath
最新文章
- 3. web前端开发分享-css,js提高篇
- Python简单爬虫入门一
- C#-WinForm-Treeview-树状模型
- appid 评价
- JS运动基础(四) 碰撞运动
- 4.Android下拉列表框spinner学习
- 如何:从代码创建 UML 类图(ZZ)
- poj 1064 (二分+控制精度) &;&; hdu 1551
- hdu 3549 Flow Problem 网络流
- BZOJ2435: [Noi2011]道路修建
- 从零开始学JAVA(05)-连接数据库MSSQL(JDBC代码篇)
- JavaScript 按回车键提交搜索表单 easyui ajax方式
- 博客停写,搬家到www.54kaikai.com
- 将泛类型集合List类转换成DataTable
- MR PAGERANK思路
- Python3定时短信获得天气
- 深入学习javaScript闭包(闭包的原理,闭包的作用,闭包与内存管理)
- PowerDesigner设置Oracle不区分大小写
- JMeter学习(八)JDBC测试计划-连接Oracle(转载)
- windows一键配置 php mysql apache 记录