Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Generic Dictionary Change Value?

Posted on 2009-05-18
5
377 Views
Last Modified: 2012-05-07
I've been trying to chage a value in a Generic Dictionary, but no change or error occurs. I've found only this link concerning updating Generic Dictionary values: http://msdn.microsoft.com/en-us/library/xfhwa508(VS.80).aspx

Dictionary<string, string> GenDictionary = new Dictionary<string, string>();

GenDictionary.Add("1","Testing");

if(GenDictionary.ContainsKey("1"))
{
    GenDictionary["1"] = "Hello";
}
0
Comment
Question by:pointeman
  • 3
  • 2
5 Comments
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 250 total points
ID: 24413779
Works just fine as-is for me!
0
 

Author Comment

by:pointeman
ID: 24414001
Yes, it's puzzling....
0
 
LVL 16

Expert Comment

by:ToddBeaulieu
ID: 24414032
So then this question isn't really needed then, right, since there's no problem?!
0
 

Author Closing Comment

by:pointeman
ID: 31582658
Had to restart Visual Studio.... Thanks for checking my code example
0
 

Author Comment

by:pointeman
ID: 24416840
Only problem is my computer it seems...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question