简体   繁体   中英

C# .NET Resources

Is it a good practice to load configuration data for a application through the use of Resources ?

Please let me know.

I am actually working with the Robotics studio and I don't think there is any other way of loading a configuration.

Depending on the data you want to load, you could use the Application Settings features of .NET.

Application settings enable you to store and retrieve property settings and other information for your application dynamically. They also enable you to maintain custom application and user preferences on the client computer.

If you want to load a large amount of data, then resources (external or embedded) might be a better idea.

if you are talking about embedded resources compiled inside the executable or the assembly surely is not a good idea because whenever you need to change the configuration you would need to recompile/build and deploy again.

Configuration should be in config files or database so you can easily react to changes in your environment without building and deploy again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM