WPF中获取程序执行路径ExecutablePath

在C#中我们可以用Application.ExecutablePath来获得程序路径

在WPF中Application这个类没有ExecutablePath

我们可以这样用

using System.Reflection;

Assembly.GetExecutingAssembly().Location;
转载:http://www.cnblogs.com/skystalker/archive/2012/04/15/2447915.html
posted @ 2012-09-20 18:17  正文  阅读(4421)  评论(0编辑  收藏  举报