从配置文件读取的正确方法是什么? [英] What is the correct way to read from the config file?

查看:113
本文介绍了从配置文件读取的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为,我们正在通过4种不同的方式来做到这一点.我们应该使用什么方法.

We are doing it, I think, 4 different ways. What is the approach we are supposed to use.

  1. 我们的某些代码是用于Web应用程序,Forms,应用程序,Silverlight等的商业库.因此,我们在其中使用的方法必须适用于所有这些情况.
  2. 我们是.NET 3.5(因为作为商业库,我们必须在.NET 2.0上运行).

??? -谢谢-戴夫(dave)

??? - thanks - dave

谁将赢得 国际大学编程锦标赛?

Who will win The International Collegiate Programming Championships?

推荐答案

我以前也有很多方法,但是现在只使用
I used to do it many ways also, but now only use ConfigurationSection class to define my own configuration sections for the application configurations. My configurations might vary little bit between applications, but usually I can use big part of the once created configuration section classes and code in different apps.


这篇关于从配置文件读取的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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