title: Inline lambda in a linq expression?
body: <p>I need help creating an inline/multiline lambda within a LINQ expression.</p>
  
  <pre><code>List&lt;myObject&gt; someList = domainModel.someMethod();
  
  Array result = (from r in someList
                  select new SelectListItem
                  {
                      Text = r.Text,
                      Value = r.Value.Select(r2=&gt; { /* &lt;&lt;&lt; Not sure how to "call it" */
                          string outputValue = "";
  
                          /* ** How do I pass in (access) this row inside here? 
                                For example....  ** */
                          outputValue = myMethod(r.Text, r.Value); 
                          /* ** Can use this records values like this? */
  
                          //Do a bunch of data massaging...
                          return outputValue; //Return modified string
                      }).ToString()
                  }).ToArray();
  </code></pre>
  
  <p>I realize I can create a private method and call that instead, but this is more for informational purposes - how to use an inline function when using linq to shape a return set.</p>