如何通过编码访问资源文件夹中创建的文件夹 [英] How to access a folder created in the resource folder through coding
本文介绍了如何通过编码访问资源文件夹中创建的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想访问我在资源文件夹中创建的文件夹的文件。
如何访问该文件夹并访问文件?
谢谢。
问候,
Saillesh
解决方案
< blockquote>如果文件被添加到.resx资源(这用于大多数控制台/ WinForms应用程序),您的应用程序将具有属性
属性,其中资源
包含所有资源的属性。
使用最合理的类型键入它们。例如,文本文件将是字符串
,JPEG将是 System.Drawing.Bitmap
等。如果您需要资源是不同的格式或类型,有可用的方法以其他方式检索资源,例如a 流
。
I want to access the file of the folder which I have created in the resource folder.
How can I access the folder and access the files?
Thanks.
Regards,
Saillesh
解决方案
If the file was added to a .resx resource (this is used for most console/WinForms applications), your application will have aProperties
property with aResources
property containing all of your resources.
They are typed using the most logical types. For example a text file will be astring
, a JPEG will be aSystem.Drawing.Bitmap
etc. If you need the resource is a different format or type, there are methods available to retrieve the resource in other ways e.g. aStream
.
这篇关于如何通过编码访问资源文件夹中创建的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文