1

Does anyone have any idea of the pros and cons of using resx vs json files for some enums (that will be possible values for attributes)?

I'm not sure what to use. And to use a database system for this would be overkill, as I'm just talking about a few lists of enums.

Small update At the moment , the only difference I can see is that with JSON storage I'm not limited to changing those lists at compile time, but they are not going to change very much over time so that is a negligible factor.

overburn
  • 1,194
  • 9
  • 27

1 Answers1

1

Resx file is good if you want some capabilities of localization, like to store your enums in different languages and so on. Json format is much more flexible and it is not depend on the .Net environment.

From this link

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.

Community
  • 1
  • 1
The scion
  • 1,001
  • 9
  • 19