Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 367549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:44:19+00:00 2026-05-12T13:44:19+00:00

I discovered this by chance when I have a duplicate key/value pairs in my

  • 0

I discovered this by chance when I have a duplicate key/value pairs in my app.config file for a .NET 2.0 console app.
To my surprise, it works and the app reads the latest pair.
I was pulling my hair when trying to figure out why I could not fetch the correct value of a key (cause I did not realise a similar key with an old value was lower down in the config file).

Example of the config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="key1" value="val1"/>
        <add key="key1" value="val2"/>
    </appSettings>
</configuration>

My question: Isn’t it ‘better’ that the framework be enforcing unique key by throwing an exception during startup or perhaps a warning during compilation?

Note: Of course we can’t really do much about the framework behaviour, just want to get some feedbacks.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T13:44:20+00:00Added an answer on May 12, 2026 at 1:44 pm

    It seems that it’s behaving like this on purpose (to support multiple values for same key)
    Here‘s an article that I found.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I discovered this quite by accident while looking for a file with a number
Possible Duplicate: Python or Ruby Interpreter on iOS I just discovered this apps pypad
I have recently discovered that I am affected by this bug http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71515.html Well, at
I have discovered recently that's possible to call anoymous blocks from jdbc like this:
So I have this iPhone app with a nested setup like this: [RootViewController]->[UITabBarController]->[UINavigationController]->[subViewControllers]. Everything
I just discovered this operator and I was wondering if it is safe to
I just discovered this component and started working with it. I understand that the
I am working with zend just recently. I discovered this ViewScript decorator for form
I've seen a plugin for Vim called AutoClose (discovered from this post) which automatically
This problem was discovered when I tried to run the Android emulator in Eclipse.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.