Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Generic Dictionary Change Value?

Posted on 2009-05-18
5
Medium Priority
?
386 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
[X]
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
  • 3
  • 2
5 Comments
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

597 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