-
C#获取当前路径7中方法
- string path1 = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
- string path2 = System.Environment.CurrentDirectory;
- string path3 = System.IO.Directory.GetCurrentDirectory();
- string path4 = System.AppDomain.CurrentDomain.BaseDirectory;
- string path5 = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
- string path6 = System.Windows.Forms.Application.StartupPath;
- string path7 = System.Windows.Forms.Application.ExecutablePath;
-
- StringBuilder str=new StringBuilder();
- str.AppendLine("System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName:" + path1);
- str.AppendLine("System.Environment.CurrentDirectory:" + path2);
- str.AppendLine("System.IO.Directory.GetCurrentDirectory():" + path3);
- str.AppendLine("System.AppDomain.CurrentDomain.BaseDirectory:" + path4);
- str.AppendLine("System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase:" + path5);
- str.AppendLine("System.Windows.Forms.Application.StartupPath:" + path6);
- str.AppendLine("System.Windows.Forms.Application.ExecutablePath:" + path7);
- string allPath = str.ToString();
-
-
相关阅读:
考虑浏览器兼容的文件上传(IE8不支持FormData)
IDEA tomcat 部署WEB项目
如何在springcloud分布式系统中实现分布式锁?
ABAP DEMO33 选择周的搜索帮助
ABAP函数篇1 日期函数
ABAP函数篇2 测试DATE_CONVERT_TO_FACTORYDATE
增强篇7 判断标准屏幕能否做屏幕增强
增强篇6 CMOD增强删除
ABAP DEMO 年月的搜索帮助
HoloLens开发手记-配置开发环境 Install the tools
-
原文地址:https://www.cnblogs.com/kuanglongblogs/p/6757095.html
Copyright © 2020-2023
润新知