Summary
Specifies a typed comparer to use for the ordering. A conversion to the
comparer type will be attempted for all metadata values. If the conversion fails,
the values will be considered equivalent. Note that this will also have the effect
of treating different convertible types as being of the same type. For example,
if you have two keys, 1 and "1", and use a string-based comparison, the
documents will compare as equal.
Syntax
public OrderBy WithComparer<TValue>(IComparer<TValue> comparer)
Type Parameters
Parameters
Name |
Type |
Description |
comparer |
IComparer<TValue> |
The typed comparer to use. |
Return Value
Type |
Description |
OrderBy |
The current module instance. |