Example I Using This Code but this code not changing value in the dictionary auto update value in dictionary on changed is possible ?
Dictionary<string, string> dic = new Dictionary<string, string>();
private void DoWork()
{
dic.Add("data", "example1");
dic.Add("data2", "example2");
if(dic.TryGetValue("data",out string c))
{
c = "Value Changed Good";
}
foreach (string s in dic.Values)
{
Console.WriteLine(s);
}
}
Example this code output is a
example1
example2
but value not changed example if value changed this output changed with this
Value Changed Good
example2