|
using System;
using System.Collections.Generic;
using System.Text;
using Config = System.Configuration;
using Citrus.Configuration;
namespace Citrus.Configuration.Demo
{
class Program
{
static void Main(string[] args)
{
EmailServerSettings anEmailServer;
anEmailServer = XmlSection<EmailServerSettings>.GetSection("EmailSettings");
Console.WriteLine(anEmailServer);
Config.Configuration c = Config.ConfigurationManager.OpenExeConfiguration(Config.ConfigurationUserLevel.None);
XmlSection<EmailServerSettings>.GetSection("EmailSettings", c).Name = "Hello";
c.Save();
Config.ConfigurationManager.RefreshSection("EmailSettings");
anEmailServer = XmlSection<EmailServerSettings>.GetSection("EmailSettings");
Console.WriteLine(anEmailServer);
anEmailServer = XmlSection<EmailServerSettings>.GetSection("ProxyEmailServer");
Console.WriteLine(anEmailServer);
Console.ReadKey();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I work as a Technology Lead for an IT services company based in India.
Passions include programming methodologies, compiler theory, cartooning and calligraphy.