导航

如何在WPF中获取程序执行路径ExecutablePath

Posted on 2012-04-15 03:08  skystalker  阅读(1029)  评论(0编辑  收藏  举报

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

在WPF中Application这个类没有ExecutablePath

我们可以这样用

using System.Reflection;

Assembly.GetExecutingAssembly().Location;