What is the best way to check if an instance is System.Linq.Expressions.Expressionempty? For example, something like this:
Expression expression = Expression.Empty();
...
if (expression.IsEmpty) { ...
only that which IsEmptydoes not exist.
One idea is to check the result ToString:
if (expression.ToString() == "default(Void)") { ...
but that does not seem right.
Dejan source
share