Tech Off Post

Single Post Permalink

View Thread: Type alias
  • User profile image
    GamlerHart

    I don't know any way. You can declare alias with a using-directive.

     

    using MyQuery = System.Linq.Expressions.Expression<System.Func<System.Linq.IQueryable<int>, System.Linq.IQueryable<int>>>;

     

    However it doesn't work to declare a 'generic' alias Sad :

    // Does NOT work =( 
      
    using MyQuery<T> = System.Linq.Expressions.Expression<System.Func<System.Linq.IQueryable<T>, System.Linq.IQueryable<T>>>;