title: How can I find out if an Expression is writeable?
body: <p>Based on some user input, I dynamically compose an <code>Expression</code>. Now, I need to distinguish the case where this expression is writable from the case where it's not. An example of a writable expression is a property expression referring to a property with a setter. A non-writable expression would for example be a call to a method.</p>
  
  <p>The Expressions library raises an <code>ArgumentExpression</code> when trying to assign to a non-writable expression. So currently, I have:</p>
  
  <pre><code>try
  {
      assign = Expression.Assign(prop2, prop1);
  }
  catch (ArgumentException)
  {
      ...
  }
  </code></pre>
  
  <p>which for various reasons isn't the greatest code. I wonder if someone knows a better way.</p>