I wrote a class library in C# that uses a external XML file to store some data. I use this data (encoded rules) directly in the class library to do some substitutions within a text parser. The rules within the XML:
<rule>
<word>h e l l o</word>
<sub>Hello</sub>
</rule>
When I share the lib, I also have to share the XML. This is a bug source, at least for me 😉 My question: is there any common way to solve such issues? Should I use app.config instead?
Thanks for any hint and best regards!
As with every external configuration data i can be changed or missing. So your application (or library) has to deal with such circumstances.
This means:
So it doesn’t matter which way to go, cause it is a user configuration (which means it can be changed by the user) and so you have to check those entries.