title: C# Lambda-Select with conditions
body: <p>I created a <code>Command</code>-class which has two important members.</p>
  
  <pre><code>public class Command
  {
      public string Name { get; set; }
      public CommandExecutedCallback Callback { get; set; }
      public delegate void CommandExecutedCallback(Command command);
  }
  </code></pre>
  
  <p>I save multiple objects of this class in a <code>List&lt;Command&gt;</code>.</p>
  
  <p>Another class <code>CommandProcessor</code> has a member function <code>GetCallbacks(string name)</code>.</p>
  
  <p>I want to use a lambda expression to get an array of <code>CommandExecutedCallback</code>-delegates with the condition that the name matches.</p>
  
  <p>I can get all Callbacks with: <code>return commandList.Select(t =&gt; t.Callback).ToArray()</code>.</p>
  
  <p>How can i insert the condition to get only commands with the specified name?</p>
  
  <p>Thank you in advance.</p>