.net 在设计时输出字符串
我的WPF应用程序在设计时运行以下代码:.net 在设计时输出字符串,.net,wpf,visual-studio-2010,design-time,.net,Wpf,Visual Studio 2010,Design Time,我的WPF应用程序在设计时运行以下代码: applicationDirectory = (from assembly in AppDomain.CurrentDomain.GetAssemblies() where assembly.CodeBase.EndsWith(".exe") select System.IO.Path.GetDirectoryName(
applicationDirectory = (from assembly in AppDomain.CurrentDomain.GetAssemblies()
where assembly.CodeBase.EndsWith(".exe")
select System.IO.Path.GetDirectoryName(
assembly.CodeBase.Replace("file:///", ""))
).FirstOrDefault();
我想看看在设计时实际返回了什么
有办法吗
注意:我尝试了Debug.Write(applicationDirectory);我在输出窗口中没有看到任何内容。注二:我不是问应用程序目录的值是什么,我是问一个机制来查看该值(这样我也可以在其他地方使用它)。您可以将路径作为视图模型的属性返回,并将其绑定到UI中的控件。对我有用