.net - Accessing hard-coded data in a C# application -


I am trying to apply hardcoding to 3.5 in the soonest possible 3.5 application.

I is a large number, which I want to map from 1 to 1 in the set of strings. Each calculated value will also map 1 to 2 values ​​by indicating an action. The current code does this with a big switch statement but it seems ugly to me

Is there a better way to access storage and data?

I have thought about resx files, but when you consider that the designer files are just as many hardcoded values ​​as this one seems a little futile.

Is embedding an XML file in the assembly a good idea?

Does not sound as bad as it sounds like a big switch statement?

Is there a better solution?

how ugly one switch statement is the most efficient way for it to wire the enums Despite it. Formatting the XML file will dim the size of your assembly and it will take longer to get the string value.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -