Load config file : config file « Development « C# / CSharp Tutorial






using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Security;
using System.Security.Permissions;
using System.Security.Policy;
using System.Xml;

public class MainClass
{
    public static void Main()
    {
        XmlDocument xml = new XmlDocument();
        xml.Load(Environment.GetCommandLineArgs()[0] + ".config");
        XmlTextWriter writer = new XmlTextWriter(Console.Out);
        writer.Formatting = Formatting.Indented;
        xml.WriteTo(writer);

    }

}








14.11.config file
14.11.1.Load config file