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

C# AppDomain.CurrentDomain.BaseDirectory的更多相关文章
- C#中AppDomain.CurrentDomain.BaseDirectory及各种路径获取方法
// 获取程序的基目录.System.AppDomain.CurrentDomain.BaseDirectory // 获取模块的完整路径,包含文件名System.Diagnostics.Proces ...
- 关于程序路径Path.Combine以及AppDomain.CurrentDomain.BaseDirectory
关于程序路径 LucenePath:@(System.Configuration.ConfigurationManager.AppSettings["LucenePath"])&l ...
- C#中AppDomain.CurrentDomain.BaseDirectory与Application.StartupPath的区别
// 获取程序的基目录. System.AppDomain.CurrentDomain.BaseDirectory // 获取模块的完整路径. System.Diagnostics.Process.G ...
- AppDomain.CurrentDomain.BaseDirectory是什么
AppDomain.CurrentDomain.BaseDirectory 是获取基目录,它由程序集冲突解决程序用来探测程序集.由显示的路径可以看出,它代表的是程序集所在的目录,它具有读取和写入的属性 ...
- AppDomain.CurrentDomain.BaseDirectory
在winform中的OnPaint事件中,AppDomain.CurrentDomain.BaseDirectory得到的是下面这个路径 C:\Program Files (x86)\Microsof ...
- AppDomain.CurrentDomain.BaseDirectory项目目录相关操作
链接:https://www.cnblogs.com/guolianyu/p/3980971.html 经常用到,每次都百度,所以自己备份一下!
- .Net AppDomain.CurrentDomain.AppendPrivatePath(@"Libs");
今天就说说.Net中通过反射取得某个类型时,我们怎么知道这个类型在硬盘上的哪个角落?比如说,假如我们需要要求服务端动态载入某个数据源,那服务端怎么知道数据源在哪?网上大部分的教程都写着,可以使用Ass ...
- AppDomain.CurrentDomain.GetAssemblies()
AppDomain.CurrentDomain.GetAssemblies() ,获取已加载到此应用程序域的执行上下文中的程序集 解释地址 从微软的解释也可以得知,这个方法只能获取已经加载到此应用程序 ...
- AppDomain.CurrentDomain.AssemblyResolve
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); 参 ...
随机推荐
- SMB relay
SMB relay 0x00 SMB服务 先来了解一下什么是 SMB 服务,SMB(Server Message Block)是一个协议名称,用它可以共享计算机之间的文件.打印机.串口等,通过 SMB ...
- github gist 无法访问
转自这里 以管理员身份在hosts文件: Windows: C:\Windows\System32\drivers\etc Ubuntu: /etc/hosts 添加: 192.30.253.118 ...
- Keras读取保存的模型时, 产生错误[ValueError: Unknown activation function:relu6]
Solution: from keras.utils.generic_utils import CustomObjectScope with CustomObjectScope({'relu6': k ...
- 将从摄像头即时读入的人像放入背景视频中_with_OpenCV_in_Python
import cv2 import numpy as np import time cap = cv2.VideoCapture(0) background_capture = cv2.VideoCa ...
- ESLint & vue
ESLint & vue { "name": "app", "version": "1.0.1", " ...
- VSCode Plugin & Auto File Header Comments Generator
VSCode Plugin & Auto File Header Comments Generator Xcode SwiftUI // // ContentView.swift // Mem ...
- C++ 0LL
C++ 0LL C plus plus L / l means long LL === long long int countDigitOne(int n) { int countr = 0; for ...
- tree traversal
tree traversal tree 遍历 中序,顺序,左中右 先序,先父节点,中左右 后序,先子节点,左右中 二叉搜索树 "use strict"; /** * * @auth ...
- HTTP/2 & Push Cache
HTTP/2 & Push Cache HTTP/2 & 推送缓存 https://caniuse.com/#search=http2 https://jakearchibald.co ...
- true && number !== boolean
true && number !== boolean bug let result = ``; // section, name ? create text, compute cent ...