title: C# Lambda expression update value to nullable field
body: <p>Please take a look at code below:</p>
  
  <pre><code>SomeList.Where(x =&gt; !x.Name.Equals("NO")).All(x =&gt; x.flag=true);
  </code></pre>
  
  <p><code>SomeList</code> is a <code>ICollection</code> </p>
  
  <p>For each of the object in <code>SomeList</code>, if the <code>Name</code> is not <code>NO</code>, <code>flag</code> of the object should be updated to be <code>true</code>. Now the problem is the <code>flag</code> is <code>bool?</code></p>
  
  <p>How should I assign value to the <code>flag</code> in such lambda expression?</p>