Getting config element from ConfigurationElementCollection
Posted
by Martin
on Stack Overflow
See other posts from Stack Overflow
or by Martin
Published on 2010-05-06T19:47:14Z
Indexed on
2010/05/07
9:48 UTC
Read the original article
Hit count: 371
I have (hopefully) setup ConfigurationElementCollection of my own design with emails as keys. Now what? Hard to find actually on the web. How do I:
iterate through it?
See if a specific element exists?
get a specific element?
...given:
YourConfigElement config =
ConfigurationManager.GetSection("YourSectionName") as YourConfigElement ;
Partial answer
Does this work? no, sadly.
foreach (X x in config.XCollection.AsQueryable()) ...
© Stack Overflow or respective owner