Is it possible to create generic type definition using using
in C#?
For example, I would want to do the following:
namespace MyNamespace
{
using TPred<T> = Expression<Func<T, bool>>;
public class Predicates
{
public static TPred<T> False<T> => f => false;
public static TPred<T> True<T> => f => true;
public static TPred<T> Or<T> (this TPred<T> expr1, TPred<T> expr2)
{
...
}
}
}
I believe that it is not possible, but wanted to verify it with wise folks from Stack Overflow ;).