Solved

Generic Dictionary Change Value?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Check my code out(2) 2 53
VB.NET HttpWebRequest 12 55
Syntax Error 2 42
SQL Login 17 37
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
A short film showing how OnPage and Connectwise integration works.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

932 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

9 Experts available now in Live!

Get 1:1 Help Now