|
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
namespace CApp
{
/// <summary>
/// Simple code to show what has been parsed from the App config
/// </summary>
class Class1
{
/// <summary>
/// Punto de entrada principal de la aplicaci�n.
/// </summary>
[STAThread]
static void Main(string[] args)
{
try
{
ArrayList nvc;
int i=0, j=0;;
nvc = (ArrayList)ConfigurationSettings.GetConfig("appSettings");
//nvc = (ArrayList)ConfigurationSettings.GetConfig("AppConfig");
foreach(Hashtable hashT in nvc)
{
Console.WriteLine("Config Section_" + i);
i++;
foreach(string key in hashT.Keys)
{
Console.WriteLine("\t" + key + ":");
foreach(ArrayList arr1 in ((ArrayList)hashT[key]))
{
Console.WriteLine("\t\t" + key + "_" + j +":");
j++;
foreach(DictionaryEntry dicentry in arr1)
{
Console.WriteLine("\t\t\tKey: " + dicentry.Key + " @ Value: " + dicentry.Value);
}
}
j=0;
}
}
Console.ReadLine();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
|
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.
Althought i'm a Electronic Engineering, my stong side is IT.
I've developped code in different languages:
Assembly, C, Java, HTML, Javascript, Perl/CGI, VB6, and C#, in which i've been working latetly.
I'm also keen on Security and Cryptography topics, as well as on Multimedia Technologies.