问题描述
我将文本文件保存在窗口应用程序文件夹中.我打开并阅读文件(我给出的确切路径).现在,我复制了整个项目并粘贴到其他根目录中.现在如何管理该文本文件的打开和读取操作.
我知道在asp.net中,我们有Server.MapPath.但是以窗口形式怎么办?请指导我
谢谢.
Hi,
I saved text file in my window application folder. I open and read the file (the path i have given exactly). Now i copied the whole project and paste in some other root. Now how to manage that text file open and read operation.
I know in asp.net we have Server.MapPath. But in window form how to do? please guide me
Thank you.
推荐答案
Application.StartupPath
欲了解更多信息,请点击这里
http://msdn.microsoft.com/en-us/library/system.windows.forms.application.startuppath.aspx [ ^ ]
For more information check here
http://msdn.microsoft.com/en-us/library/system.windows.forms.application.startuppath.aspx[^]
这篇关于在Windows窗体中查找文件夹路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!