What are the benefits of resource(.resx) files?

前端 未结 5 1675
萌比男神i
萌比男神i 2020-11-27 13:31

What compelling reasons exist for using them?

5条回答
  •  情歌与酒
    2020-11-27 14:09

    • 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.

提交回复
热议问题