您的位置:首页 > 编程语言 > C#

获取程序集路径 父路径 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();

}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: