简体   繁体   English

资源参考问题

[英]Resources reference issue

I obtained a sample code in which it has a Resources folder under the projects, and it was able to use the folder as an object directly. 我获得了一个示例代码,其中在项目下有一个Resources文件夹,它能够直接将该文件夹用作对象。

在此处输入图片说明 在此处输入图片说明

But when I create my own project, even though I was able to create the resources folder, I was NOT able to use it directly! 但是,当我创建自己的项目时,即使能够创建资源文件夹,也无法直接使用它! Instead I was referenced to the resource file I created! 而是引用了我创建的资源文件!

在此处输入图片说明 在此处输入图片说明

And I was NOT able to find any declarations of the folder as an object in anywhere in the sample project! 而且我无法在示例项目的任何地方找到该文件夹​​的任何声明作为对象! And the funny thing is, it doesn't have resx files! 有趣的是,它没有resx文件! I was like it could use the folder magically!!! 我好像可以神奇地使用该文件夹!!!

And I did a lot of researches in Google, but all I can find is how to create to resource file. 我在Google上做了很多研究,但是我所能找到的就是如何创建资源文件。 That's how I learned how to create it. 这就是我学习如何创建它的方式。 But I can't find anything telling me why it could be used directly as an object! 但是我找不到任何告诉我为什么可以直接将其用作对象的信息!

Thank you very very much for your help!!! 非常感谢您的帮助!!!

I figured it out! 我想到了! You have to create the folder first and then create the resource resx "INSIDE" the folder!!! 您必须先创建文件夹,然后在文件夹“ INSIDE”中创建资源resx !!! Then you could use the folder as an object! 然后,您可以将文件夹用作对象! Sorry for wasting y'all's time!!! 抱歉浪费您的时间!!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM