zoukankan      html  css  js  c++  java
  • C# AppDomain.CurrentDomain.BaseDirectory

    AppDomain.CurrentDomain.BaseDirectory   是获取基目录,它由程序集冲突解决程序用来探测程序集。由显示的路径可以看出,它代表的是程序集所在的目录,它具有读取和写入的属性。这只不过是它常用的属性,如果你要使用这些属性,你的文件【123.txt】要放在程序集的目录下。还有使用它需要导入IO包。以上转自:http://gaima1008.blog.163.com/blog/static/680191472013629103117818/

    AppDomain.CurrentDomain.BaseDirectory,获取基目录,基目录:指应用程序所在的目录。

    // 获取程序的基目录。
    System.AppDomain.CurrentDomain.BaseDirectory
    
    // 获取模块的完整路径。
    System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
    
    // 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。
    System.Environment.CurrentDirectory
    
    // 获取应用程序的当前工作目录。
    System.IO.Directory.GetCurrentDirectory()
    
    // 获取和设置包括该应用程序的目录的名称。
    System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase
    
    以上转自:http://www.cnblogs.com/zhouzangood/articles/2987088.html

  • 相关阅读:
    nginx article
    学习历程
    GRPC
    学习记录
    JAVA知识点记录
    flag
    读的文章
    This usually happens because your environment has changed since running `npm install`.
    expandedRowKeys、expandedRowsChange、expand
    服务端高并发分布式架构演进之路
  • 原文地址:https://www.cnblogs.com/damugua/p/14368141.html
Copyright © 2011-2022 走看看