gpt4 book ai didi

c# - 从 WPF 应用程序获取应用程序的目录

转载 作者:IT王子 更新时间:2023-10-29 03:30:56 26 4
gpt4 key购买 nike

我找到了适用于带有 AppDomain 的 Windows 窗体的解决方案,但是什么是 WPF Application 对象的等价物?

最佳答案

一种方法:

System.AppDomain.CurrentDomain.BaseDirectory

另一种方法是:

System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName)

关于c# - 从 WPF 应用程序获取应用程序的目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/938421/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com