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

最新文章

  1. 3. web前端开发分享-css,js提高篇
  2. Python简单爬虫入门一
  3. C#-WinForm-Treeview-树状模型
  4. appid 评价
  5. JS运动基础(四) 碰撞运动
  6. 4.Android下拉列表框spinner学习
  7. 如何:从代码创建 UML 类图(ZZ)
  8. poj 1064 (二分+控制精度) && hdu 1551
  9. hdu 3549 Flow Problem 网络流
  10. BZOJ2435: [Noi2011]道路修建
  11. 从零开始学JAVA(05)-连接数据库MSSQL(JDBC代码篇)
  12. JavaScript 按回车键提交搜索表单 easyui ajax方式
  13. 博客停写,搬家到www.54kaikai.com
  14. 将泛类型集合List类转换成DataTable
  15. MR PAGERANK思路
  16. Python3定时短信获得天气
  17. 深入学习javaScript闭包(闭包的原理,闭包的作用,闭包与内存管理)
  18. PowerDesigner设置Oracle不区分大小写
  19. JMeter学习(八)JDBC测试计划-连接Oracle(转载)
  20. windows一键配置 php mysql apache 记录

热门文章

  1. JavaScript文本框焦点事件
  2. PHPPCRE正则解析
  3. Could not obtain transaction-synchronized Session for current thread 错误的解决方法!
  4. Pig关系型运算符例子
  5. Leecode刷题之旅-C语言/python-1.两数之和
  6. C语言实现斐波那契数列
  7. HyperLedger Fabric 1.4 交易流程(6.3)
  8. Python | 用Pyinstaller打包发布exe应用
  9. Spring AOP(一)——基础概念
  10. Windows自带的磁盘填充命令