About Configuration File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yogesh parashar

    About Configuration File

    is there any way out we can have more than one config files with C# or
    atleast can we have config file with class
    library ?
    Thanx in advance

    Yogesh


  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: About Configuration File

    Hi,

    No, you can't and unfortunally ConfigurationSe ttings is sealed, so you will
    have to implement yours, Which should not be so difficult as long as your
    config file is a XML, you could create an Index property just like
    ConfigurationSe ttings 's AppSettings and then look it up in the XML file (
    file which you read and kept stored in memory ). You could pass to the
    constructor the path of the file you want to use.


    cheers,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation


    "Yogesh parashar" <xxx@xxx.com> wrote in message
    news:eI9$YzbYFH A.980@TK2MSFTNG P12.phx.gbl...[color=blue]
    > is there any way out we can have more than one config files with C# or
    > atleast can we have config file with class
    > library ?
    > Thanx in advance
    >
    > Yogesh
    >
    >[/color]


    Comment

    Working...