什么是资源(的.resx)文件的好处是什么? [英] What are the benefits of resource(.resx) files?
问题描述
有什么令人信服的理由使用它们的存在吗?
What compelling reasons exist for using them?
推荐答案
-
资源文件给你一个简单的方法来定位/通过自动确定哪些语言的resx文件中使用基于用户的语言环境国际化的.NET应用程序。要添加更多的语言,只需添加另一个翻译的资源文件。
Resource files give you an easy way to localize/internationalize your .net applications by automatically determining which language resx file to use based on the user's locale. To add more languages, simply add another translated resource file.
资源文件给你一个中心位置来存储你的字符串,文件和脚本,并指他们在一个强类型的方式(因此,如果您引用这些不当的编译将打破)。
Resource files give you a central location to store your strings, files and scripts and refer to them in a strongly-typed manner (so the compile will break if you reference them improperly).
资源文件可以被编译成附属程序集,因此很容易改变在生产应用程序中的资源,而无需重新编译整个事情。
Resource files can be compiled into satellite assemblies, making it easy to change up the resources in a production application without having to recompile the whole thing.
这篇关于什么是资源(的.resx)文件的好处是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!