Answers for "c# dictionary modify value"

C#
0

c# modify dictionary in loop

List<string> keys = new List<string>(colStates.Keys);
foreach(string key in keys)
{
    colStates[key] +=  4;   
}
Posted by: Guest on December-10-2020
0

how to change all values in dictionary c#

dict = dict.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(v => v.Nr));
Posted by: Guest on August-23-2020

C# Answers by Framework

Browse Popular Code Answers by Language