许多文件夹的本地资源文件 [英] Local Resource File for many folders

查看:71
本文介绍了许多文件夹的本地资源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我有很多文件夹.如何在同一位置为所有文件夹创建资源文件

In my Project, I have many folders. how can i create a resource file for all folders in same place

推荐答案

最好的方法是为它们创建一个单独的类库项目,并将它们作为资源包含在其中按照通常的方式在Resourses.resx文件中.如果确保使用资源"页面上的访问修饰符"下拉列表将每个资源声明为public,则可以在其他项目中添加对该DLL的引用,并通过以下方式访问字符串,图像等该名称空间的静态Properties对象:
The best way is to create a separate Class Library project for them, and include them there as Resources in the Resourses.resx file in the usual way. If you make sure that the each of the resources is declared public using the "Access Modifier" drop down on the Resources page, you can then add a reference to the DLL in your other projects and access the stings, images, etc via the static Properties object of that namespace:
Image myImage = myPropertiesProjectName.Properties.Resources.TheNameOfTheImageIWant;


这篇关于许多文件夹的本地资源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆