Answers for "c# list item update"

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
0

update value in list c#

var result = list.Select(i => 
   { 
      if (i.Name == "height") i.Value = 30;
      return i; 
   }).ToList();
Posted by: Guest on October-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language