zoukankan      html  css  js  c++  java
  • C# 各种相对路径

               //获取当前可执行的exe的文件名
                string str1 = Process.GetCurrentProcess().MainModule.FileName;
                //获取或设置当前目录
                string str2 = Environment.CurrentDirectory;
                //获取应用程序的当前工作目录
                string str3 = Directory.GetCurrentDirectory();
                //获取基目录
                string str4 = AppDomain.CurrentDomain.BaseDirectory;
                //获取启动了应用程序的可执行文件的路径,不包括可执行文件的名称
                string str5 = Application.StartupPath;
                //获取启动了应用程序的可执行文件的路径,不包括可执行文件的名称
                string str6 = Application.ExecutablePath;
                //获取或设置包含该应用程序的目录的名称
                string str7 = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
  • 相关阅读:
    python——数据库操作
    【笔试】T实习生2014 总结
    【JS】Intermediate6:jQuery
    【JS】Intermediate5:Scope
    【JS】Intermediate4:JSON
    【JS】Intermediate3:AJAX
    【JS】Intermediate2:Events and Callbacks
    【JS】Intermediate1:The DOM
    【JS】Beginner9:Arrays
    【JS】Beginner8:Objects
  • 原文地址:https://www.cnblogs.com/xuekai-to-sharp/p/3437162.html
Copyright © 2011-2022 走看看