title: Is there a way to specify an "empty" C# lambda expression?
body: <p>I'd like to declare an "empty" lambda expression that does, well, nothing.
  Is there a way to do something like this without needing the <code>DoNothing()</code> method?</p>
  
  <pre><code>public MyViewModel()
  {
      SomeMenuCommand = new RelayCommand(
              x =&gt; DoNothing(),
              x =&gt; CanSomeMenuCommandExecute());
  }
  
  private void DoNothing()
  {
  }
  
  private bool CanSomeMenuCommandExecute()
  {
      // this depends on my mood
  }
  </code></pre>
  
  <p>My intent in doing this is only control the enabled/disabled state of my WPF command, but that's an aside. Maybe it's just too early in the morning for me, but I imagine there must be a way to just declare the <code>x =&gt; DoNothing()</code> lambda expression in some way like this to accomplish the same thing:</p>
  
  <pre><code>SomeMenuCommand = new RelayCommand(
      x =&gt; (),
      x =&gt; CanSomeMenuCommandExecute());
  </code></pre>
  
  <p>Is there some way to do this? It just seems unnecessary to need a do-nothing method.</p>