P********s 发帖数: 15 | |
st 发帖数: 1685 | 2 sure. but your program is in charge of loading its content....
【在 P********s 的大作中提到】 : 在运行期间可不可以由程序改其中的内容?
|
e*********s 发帖数: 200 | 3 sure you can change the .config to save application user, app domain level or
individual level
of settings inside a .config file :)
【在 st 的大作中提到】 : sure. but your program is in charge of loading its content....
|
st 发帖数: 1685 | 4 actually I wanted to say if your app doesnot check change and reload,
it wont know the content of the config has changed.
【在 e*********s 的大作中提到】 : sure you can change the .config to save application user, app domain level or : individual level : of settings inside a .config file :)
|
P********s 发帖数: 15 | 5 Thank you for all your replies. I am using the
"ConfigurationSettings.GetConfig" or
"ConfigurationSettings.AppSettings"
method to read the configurations in .config file. But I can't find a write or
set method available in System.Configuration namespace.
Could anyone point me to the right place please? A simple example code block
would be even better.
BOW//
or
【在 st 的大作中提到】 : actually I wanted to say if your app doesnot check change and reload, : it wont know the content of the config has changed.
|
st 发帖数: 1685 | 6 it's xml file, load it and change it as xml document bah
【在 P********s 的大作中提到】 : Thank you for all your replies. I am using the : "ConfigurationSettings.GetConfig" or : "ConfigurationSettings.AppSettings" : method to read the configurations in .config file. But I can't find a write or : set method available in System.Configuration namespace. : Could anyone point me to the right place please? A simple example code block : would be even better. : BOW// : : or
|
P********s 发帖数: 15 | 7 Is this the only way? I thought .NET can provide some built-in functions to
handle it, since the schema of the config files are already defined.
write or
block
【在 st 的大作中提到】 : it's xml file, load it and change it as xml document bah
|
st 发帖数: 1685 | 8 not sure, but it's pretty easy to do..... helper class it not really necessary
【在 P********s 的大作中提到】 : Is this the only way? I thought .NET can provide some built-in functions to : handle it, since the schema of the config files are already defined. : : write or : block
|
e*********s 发帖数: 200 | 9
peng! search MSDN carefully...there are tons of functions to achieve what you
want to do ! ... -_-!!..
【在 P********s 的大作中提到】 : Is this the only way? I thought .NET can provide some built-in functions to : handle it, since the schema of the config files are already defined. : : write or : block
|
e*********s 发帖数: 200 | 10
or
what version of .Net are you running?
framework 1.0 and 1.1 are pretty lame.....use .Net 2.0 and Widbey
instead...you can write/update/
dynamically add sections to the .config pretty easily :)
【在 P********s 的大作中提到】 : Thank you for all your replies. I am using the : "ConfigurationSettings.GetConfig" or : "ConfigurationSettings.AppSettings" : method to read the configurations in .config file. But I can't find a write or : set method available in System.Configuration namespace. : Could anyone point me to the right place please? A simple example code block : would be even better. : BOW// : : or
|
P********s 发帖数: 15 | 11 Yes, I am using 1.1. So sounds like such functionality will be provided in
2.0. I will take a look at the 2.0 docs. Thanks for the information.
Unfortunately, .NET 2.0 still in Beta. Beta for evaluation is okay, but I
don't think using beta for production is a good idea.
write
block
【在 e*********s 的大作中提到】 : : or : what version of .Net are you running? : framework 1.0 and 1.1 are pretty lame.....use .Net 2.0 and Widbey : instead...you can write/update/ : dynamically add sections to the .config pretty easily :)
|