title: How to update node value in a linkedlist using linq
body: <p>I'd like to update a node value in a linked list using linq. Traversing the list, finding the right node and updating the value works, but I think a linq method could be cleaner. </p>
  
  <p>This is my attempt which gives a compile error <code>cannot convert lambda expression to type &lt;Main.Globals.Node&gt; because it is not a delegate type</code>:</p>
  
  <pre><code>// get IV value where Node BookID=4
  var val = Globals.BookLL.Where(B =&gt; B.BookID == 4).Select(B =&gt; B.IV).Single();
  
  // can update first node using this method
  Globals.BookLL.First.Value.IV = 999;
  
  // can upddate IV by traversing list
  LinkedListNode&lt;Globals.Node&gt; Current = Globals.BookLL.First;
  while (Current != null)
              {
                  if(Current.Value.BookID==4)
                  {
                      Current.Value.IV = 444;
                  }
                  Current = Current.Next;
              }
  
     // how can you update IV using linq?
     Globals.BookLL.Find(B =&gt; B.BookID == 4).Value.IV = 999;        // cannot convert lambda expression to type &lt;Main.Globals.Node&gt; because it is not a delegate type
  </code></pre>
  
  <p>Thanks for any help.</p>