All new articles provide code in C# and VB.NET.
Carlos Sosa Albert wrote:
> Hi guys,
>
> Is there a way to use a foreach (C#) to go through a settings file like
> this?
>
> I can't find a collection in MyProject.MyConfigurationFile.settings.xxx,
> I cant only access the settings refering like
> MyProject.MyConfigurationFile.settings.Default.key1,
> MyProject.MyConfigurationFile.settings.Default.key2, etc.
>
> Thanks a lot!!!
>
> settings file:
> _______________________________________________
> <?xml version='1.0' encoding='utf-8'?>
> <SettingsFile
> xmlns="
http://schemas.microsoft.com/VisualStudio/2004/01/settings" > CurrentProfile="(Default)" GeneratedClassNamespace="CoachLibrary"
> GeneratedClassName="InitialConfiguration">
> <Profiles />
> <Settings>
> <Setting Name="key1" Type="System.String" Scope="Application">
> <Value Profile="(Default)">abc</Value>
> </Setting>
> <Setting Name="key2" Type="System.String" Scope="Application">
> <Value Profile="(Default)">xyz</Value>
> </Setting>
> </Settings>