Comparable Type

Lars Ivar Igesund larsivar at igesund.net
Thu Dec 11 13:19:12 PST 2008


saotome wrote:

> Hi,
> 
> can someone tell me how can i check whether a type is comparable ? Is
> there something like "IComparable" in C# ?

Unfortunately not - the relevant operators are defined in opCmp, so they will always be implemented, even if the implementation may not be sane.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango


More information about the Digitalmars-d-learn mailing list