Hi,
i am using a app.config file in my console application.
App.config code-->
<configuratio n>
<configSections >
<section name="enterpris eLibrary.Config urationSource" type="Microsoft .Practices.Ente rpriseLibrary.C ommon.Configura tion.Configurat ionSourceSectio n, Microsoft.Pract ices.Enterprise Library.Common, Version=3.1.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a" />
</configSections>
<enterpriseLibr ary.Configurati onSource selectedSource= "File Configuration Source">
<sources>
<add name="File Configuration Source" type="Microsoft .Practices.Ente rpriseLibrary.C ommon.Configura tion.FileConfig urationSource, Microsoft.Pract ices.Enterprise Library.Common, Version=3.1.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a"
filePath="CS.co nfig" />
<add name="System Configuration Source" type="Microsoft .Practices.Ente rpriseLibrary.C ommon.Configura tion.SystemConf igurationSource , Microsoft.Pract ices.Enterprise Library.Common, Version=3.1.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a" />
</sources>
</enterpriseLibra ry.Configuratio nSource>
</configuration>
in the above code one config section "enterpriseLibr ary.Configurati onSource" is present. with in this elements collection ("sources"). i want to get the value of the filePath i.e CS.Config present in side the "Sources" element in my console application.
can any one help me in getting the values from app.config file.
Thanks alot in advance.
i am using a app.config file in my console application.
App.config code-->
<configuratio n>
<configSections >
<section name="enterpris eLibrary.Config urationSource" type="Microsoft .Practices.Ente rpriseLibrary.C ommon.Configura tion.Configurat ionSourceSectio n, Microsoft.Pract ices.Enterprise Library.Common, Version=3.1.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a" />
</configSections>
<enterpriseLibr ary.Configurati onSource selectedSource= "File Configuration Source">
<sources>
<add name="File Configuration Source" type="Microsoft .Practices.Ente rpriseLibrary.C ommon.Configura tion.FileConfig urationSource, Microsoft.Pract ices.Enterprise Library.Common, Version=3.1.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a"
filePath="CS.co nfig" />
<add name="System Configuration Source" type="Microsoft .Practices.Ente rpriseLibrary.C ommon.Configura tion.SystemConf igurationSource , Microsoft.Pract ices.Enterprise Library.Common, Version=3.1.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a" />
</sources>
</enterpriseLibra ry.Configuratio nSource>
</configuration>
in the above code one config section "enterpriseLibr ary.Configurati onSource" is present. with in this elements collection ("sources"). i want to get the value of the filePath i.e CS.Config present in side the "Sources" element in my console application.
can any one help me in getting the values from app.config file.
Thanks alot in advance.
Comment