Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. App.config with custom section and custom elements collection inside

App.config with custom section and custom elements collection inside

Scheduled Pinned Locked Moved C#
databasehelptutorialquestionworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xkrja
    wrote on last edited by
    #1

    I want to set up a config section in my app.config that looks something like below: <ConfiguredDatabases> <Database Type="MyFirstDatabase" /> <Database Type="MySecondDatabase" /> <Database Type="MyThirdDatabase" /> </ConfiguredDatabases> But I don't understand how to the custom configuration class need to look like in order to get this to work. I found the below link: http://devlicio.us/blogs/derik_whittaker/archive/2006/11/13/app-config-and-custom-configuration-sections.aspx[^] But in that sample it looks like below: <StartupFolders> <Folders> <add folderType="A" path="c:\foo" /> <add folderType="B" path="C:\foo1" /> </Folders> </StartupFolders> You see that there is a difference: The element names in the collection are named 'add'. I want the to have a custom name (like 'Database'). It's more clear to me. How would I proceed to achieve that? Thanks for help!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups