Writing some XML documentation for a predicate helper class. But I can't figure out I can refer to an Expression<Func<T, bool>>
without getting a syntax error. Is it even possible? I have tried this:
<see cref="Expression{Func{T, bool}}"/>
But I get a red squiggly line under {T, bool}}
. This works though:
<see cref="Expression{TDelegate}"/>
Anyone have a clue?
Update:
The answer that was given (and I accepted) seemingly did work. But now I have started to get a lot of warnings about stuff not being able to resolve. I have a class called ExpressionBuilder<T>
which works with Expression<Func<T, bool>>
a lot. So I of course want to refer to that in my XML comments.
I have tried both versions that I know about:
<see cref="Expression<Func<T, Boolean>>"/>
<see cref="Expression{Func{T, Boolean}}"/>
But neither work. (And on the last one, ReSharper puts a blue squiggly under {T,Boolean}}
I get two warnings under compilation everywhere I have used it which says that:
- XML comment on 'blah blah' has cref attribute 'Expression>' that could not be resolved
- Type parameter declaration must be an identifier not a type. See also error CS0081.
Have the same issue somewhere I tried to refer to Range<Nullable<DateTime>>
(Range<DateTime?>
didnt work either. Both with { } and with < >
)
Am I not supposed to refer to these kinds of generics?
List{Int32}
, it should be,List{T}
because there's not an actualList{Int32}
class sitting around in the code base somewhere, there's only aList{T}
.Int32
is a type,T
is an identifier. – BrainSlugs83