473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Configuration / Collection problem

Rab
Hi everyone

I`m having a problem extracting some values from an app.config file.
I`m storing a collection of name value pairs in the config file, and
retreiving them using a custom handler that implements
IConfigurationSectionHandler. It works fine, except my data is such
that I need to be able to retrieve it in the same order that it is
stored, and some of the pairs have the same names. Obviously a
Hashtable cant handle this, so I need find an object which can accept
these values for use in the app.

Any ideas?

Many thanks
Nov 16 '05 #1
1 1753
Rab,
Rather then use a HashTable, have you considered using a
System.Collections.Specialized.NameValueCollection ?

Or deriving your own from
System.Collections.Specialized.NameObjectCollectio nBase?

Hope this helps
Jay

"Rab" <ja******@hotmail.com> wrote in message
news:a2**************************@posting.google.c om...
Hi everyone

I`m having a problem extracting some values from an app.config file.
I`m storing a collection of name value pairs in the config file, and
retreiving them using a custom handler that implements
IConfigurationSectionHandler. It works fine, except my data is such
that I need to be able to retrieve it in the same order that it is
stored, and some of the pairs have the same names. Obviously a
Hashtable cant handle this, so I need find an object which can accept
these values for use in the app.

Any ideas?

Many thanks

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Arun | last post by:
Hi I am using the following Tomcat: 4.1.27-LE-jdk14 Apache: 2.0.47 Java : 1.4.2 Linux OS: 7.3 I am trying to configure LDAP authentication mechanism to my
3
by: Robert | last post by:
I have an application with custom configuration sections in it's app.config file. Here's a shortened excerpt: <monitors> <monitor...
3
by: Florida Coder | last post by:
I have the need to store some application specific configuration data to be used by a class library and or a windows service. I would like to do this in a fashion similar to the way we do with...
2
by: gcrasher | last post by:
What is the easiest way to store a collection of strings using the MS Configuration Block? I am using XML serializer. I tried having an ArrayList as a property in the class I was serializing, but...
5
by: Water Cooler v2 | last post by:
I know that we can add a single name value entry in app.config or web.config in the configuration/configSettings/appSettings section like so: <add key="key" value="value" /> Question: I want...
4
by: Michael Lang | last post by:
I was basically wanting to know how to use the System.Configuration namespace to be able to load an arbitrary number of unknown attributes on an element in a custom section in the .config into a...
6
by: Steve Kershaw | last post by:
I have a problem in which I'm trying to access a method in a .DLL from an ASP.Net web page (written in C#). I keep on getting the error "The current configuration system does not support...
1
by: =?Utf-8?B?RGljaw==?= | last post by:
My Windows Application stores its configuration values in app.config and these are typed and accessed via corresponding classes, something like this... <configSections> <section name="Watcher"/>...
4
balabaster
by: balabaster | last post by:
Okay, I decided that I needed to understand the whole custom configuration file bits and so I've spent some time playing around with it. It seems (in the most) relatively straight forward. However,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.