获取程序集路径 父路径 c#
2016-01-03 11:38
253 查看
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Reflection; using System.IO; namespace ConsoleApplication9 { class Program { static void Main(string[] args) { string padh = Assembly.GetExecutingAssembly().Location; padh = Path.GetDirectoryName(padh); Console.WriteLine(Assembly.GetExecutingAssembly().Location); Console.WriteLine(Directory.GetParent(padh)); Console.ReadKey(); } } }
相关文章推荐
- c#下使用webdriver WebDriverWait不能正确控制超时的问题
- C#编程中的三中结构
- 在C#中,有6个关系运算符,用于比较两个事物之间的关系
- 自加自减复合赋值-关系表达式
- 在C#中,有五个算术运算符:+,-,*,/,%
- c#.net 获取时间日期年月日时分秒生成自动文件名格式
- C#位运算
- 对virtual关键字的思考
- C# 颜色表
- 【c#】树节点控件
- 【设计模式】模板方法模式
- c#中字体的用法与代码
- C#做windows应用程序超链接到网址
- C# 20161.2
- C# 3.0 新特性 学习(二):匿名类型、扩展方法
- C#中数组[],ArrayList,List<T>泛型的区别
- 【设计模式】代理模式
- C#之方法与函数
- 【总结】初识C#变量
- 多线程下C#如何保证线程安全?