如何获取C#项目中使用的文件的文件路径 [英] How to get the file path of a file used in C# project
本文介绍了如何获取C#项目中使用的文件的文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有C#应用程序,我在其中添加了一个音频文件到项目资源。
现在我想在srting中获取这个alert.wav文件的路径。
我可以像这样访问该资源(alert.wav)文件
I have C# Application in which I added a audio file to the project resources.
Now I want to get the path of this "alert.wav" file in a srting.
I am able to access that resource(alert.wav) file like this
Application.Properties.Resources.alert
任何线索如何获取此文件的路径。
任何帮助将不胜感激。
提前致谢。
Any clues how can I get the pathof this file.
Any help will be appreciated.
Thanks in advance.
推荐答案
参见 System.IO [ ^ ]
-KR
See System.IO[^]
-KR
这篇关于如何获取C#项目中使用的文件的文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文