zoukankan      html  css  js  c++  java
  • C#获取程序启动目录

               
    //WCF service:
     string servicePath = System.Web.Hosting.HostingEnvironment.MapPath("~");
    
     //F:WorkSpaceEHRsrcvs2010EHREHRinDebug
                string strBaseDirectory = System.AppDomain.CurrentDomain.BaseDirectory;
    
                //F:WorkSpaceEHRsrcvs2010EHREHRinDebugEHR.vshost.exe
                string strMainModule = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
    
                //F:WorkSpaceEHRsrcvs2010EHREHRinDebug
                string strCurrentDirectory = System.Environment.CurrentDirectory;
    
                //F:WorkSpaceEHRsrcvs2010EHREHRinDebug
                string strGetCurrentDirectory = System.IO.Directory.GetCurrentDirectory();
    
                //F:WorkSpaceEHRsrcvs2010EHREHRinDebug
                string strApplicationBase = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
    
                //F:WorkSpaceEHRsrcvs2010EHREHRinDebug
                string strStartupPath=System.Windows.Forms.Application.StartupPath;
    
                //F:WorkSpaceEHRsrcvs2010EHREHRinDebugEHR.EXE
                string strExecutablePath = System.Windows.Forms.Application.ExecutablePath;
  • 相关阅读:
    第二次结对编程作业
    第5组 团队展示
    第一次结对编程作业
    BETA 版冲刺前准备(团队)
    项目测评(团队)
    1111111111
    Alpha 事后诸葛亮
    Alpha 冲刺 (10/10)
    Alpha 冲刺 (9/10)
    Alpha 冲刺 (8/10)
  • 原文地址:https://www.cnblogs.com/quietwalk/p/3531713.html
Copyright © 2011-2022 走看看