I am new to Linq.
I want to set two values in foreach statement like this
foreach
My actual code is this
foreach (Employee emp in employees
employees.ToList().Foreach(u=> { u.SomeProperty = null; u.OtherProperty = null; });
Notice that I used semicolons after each set statement that is -->
u.SomeProperty = null; u.OtherProperty = null;
I hope this will definitely solve your problem.