title: How to make generic function that return int or date or string
body: <p>I need to realize a function which return an <code>Expression&lt;Func&lt;MyObject, T&gt;&gt;</code>, where T could be an integer, a string or a datetime.
  The caller won't know the type of T.
  What I want to achieve is a function which create a predicate that can be used in a Linq OrderBy function.
  The should be something like:</p>
  
  <pre><code>class FilterCreator {
     ...
     Expression&lt;Func&lt;MyObject, T&gt;&gt; getOrderExpression()
     {
     ...
     }
  }
  
  class Consumer{
     void mymethod()
     {
        var orderedList = MyList.OrderBy(filterCreator.getOrderExpression());
     }
  }
  </code></pre>