Solved

Generic Dictionary Change Value?

Posted on 2009-05-18
5
370 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now