阅读使用FILESTREAM从根目录文件夹中的文件 [英] Read file from root directory folder using filestream
问题描述
有我的文件夹中的两个图像文件,我有我的程序调用。我用:
AppDomain.curentDomain.baseDirectory +路径和文件名;
但这种进入我的bin目录下,我不希望;我想读从根目录下的文件夹,我的文件夹名称为资源我救了我的文件中,有和调用图像,所以请有什么代码是什么?
怎么办我从一个Windows窗体应用程序的根目录中读取?
通常情况下,你必须设置那些项目复制到bin文件夹。
右键单击解决方案浏览器/导航仪,选择属性,然后设置
复制到输出目录。希望这将工作
块引用>There are two Image files in my folder which I have to call in my program. I have used:
AppDomain.curentDomain.baseDirectory + "Path and file name";
But this goes into my bin directory which I don't want; I want to read the folder from root directory where my folder name as resource I have saved my file there and call the image so please what's the code for that?
How do I read from root directory in a Windows Form Application?
解决方案Usually, you have to set those items to be copied into the bin folder. Right click in solution explorer/navigator, choose properties and set "Copy to output directory". hope this will work
这篇关于阅读使用FILESTREAM从根目录文件夹中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!