Answers for "c# change values in list"

C#
2

c# edit element in list

var index = list.FindIndex(c => c.Number == someTextBox.Text);
list[index] = new SomeClass(...);
Posted by: Guest on March-23-2020
0

update value in list c#

foreach (var mc in list.Where(x => x.Name == "height"))  
     mc.Value = 30;
Posted by: Guest on October-25-2021

C# Answers by Framework

Browse Popular Code Answers by Language