配置文件作为嵌入资源 [英] Configuration File as Embedded Resource

查看:43
本文介绍了配置文件作为嵌入资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有在 VB.NET 或 C# 中使用嵌入式配置文件的示例?我了解如何嵌入配置文件,但之后访问它的最佳方法是什么?我可以把它当作一个配置文件,就像我对待外部配置文件一样吗?

Does anyone out there have an example of using an embedded Configuration File in either VB.NET or C#? I understand how to embed the configuration file, but what is the best method to access it afterward? Can I treat it as a configuration file, like I can with the external configuration files?

非常感谢任何帮助.

推荐答案

我认为将配置文件作为嵌入式资源并不是一个想法.嵌入的资源被打包到 dll 中,之后如果不重新编译就无法更改配置(这首先是配置文件的想法).

i believe it's not the idea to put config file to be an embedded resource. embedded resources get packed into the dll and you can't change your configuration afterwards without recompilation (which is the idea of a config file in a first place).

这篇关于配置文件作为嵌入资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆