Re: Equality of simple values - Where is my mistake?

ht writes:

> But that would have the bad effect of treating e.g. (string)5 as equal
> to (decimal)5.0, which is certainly wrong no matter how you look at
> it.

I assumed that for values to be equal they must have either the same type or
the type of one value must be a base type of the type of the other value.
Therefore, clearly

(string)5 != (decimal)5.0 

but

(anySimpleType)5 = (string)5 = (byte)5 = (decimal)5.000 = ...

which makes sense and should be valid.

--Stefan

Received on Wednesday, 30 October 2002 05:46:12 UTC