title: Are there any official ways to write an Immediately Invoked Function Expression?
body: <p>Something like this:</p>
  
  <pre><code>var myObject = new MyClass()
  {
      x = " ".Select(y =&gt;
      {
          //Do stuff..
          if (2 + 2 == 5)
              return "I like cookies";
          else if (2 + 2 == 3)
              return "I like muffins";
          //More conditions...
          else
              return "I'm a bitter old man";
      })
  };
  </code></pre>
  
  <p>I realize Select is not intended to be used this way. But yeah, what are some other ways to do the same thing?</p>