Find the location of my application's executable in WPF (C# or vb.net)?

前端 未结 7 1360
借酒劲吻你
借酒劲吻你 2020-12-08 04:02

How can I find the location of my application\'s executable in WPF (C# or VB.Net)?

I\'ve used this code with windows forms:

Application.ExecutablePat         


        
7条回答
  •  悲哀的现实
    2020-12-08 04:36

    this is useful for you: Application.ExecutablePath equals to:

    Process.GetCurrentProcess().MainModule.FileName;
    

提交回复
热议问题