开发者

Where should one store application strings when localization isn't needed?

开发者 https://www.devze.com 2023-01-15 21:07 出处:网络
Should I use settings, store them as resources, load them into a Dictionary, or just hard-code them? Or is there another, better way?

Should I use settings, store them as resources, load them into a Dictionary, or just hard-code them?

Or is there another, better way?

I've been hard-coding the开发者_开发百科m for apps that don't need localization, but it seems like there might be a more elegant approach.


In general, using resource files still works well. It gives the advantage of being able to use consistent text (error messages, warnings, notices, etc.) and allows you to modify text without rebuilding your app.


I would store them in resources anyway.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号