Is there any way through which we can update List records based on specified condition in C#, any customized method will also work except loop -


lststudents.first(m => m.passed == "").passoutyear= currentyear; 

is there other way update records in bulk above statement updates on first record in list.

foreach (var student in lststudents.where(m => m.passed == "")) {     student.passoutyear = currentyear; } 

Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -