[Mono-list] Byte.CompareTo etc

James Ots me@jamesots.com
12 Jan 2002 19:00:52 +0000


Is there a reason why Byte.CompareTo (and other .CompareTos) contains
the following code:

----
byte xv = (byte) v;
if (value == xv)
	return 0;
if (value > xv)
	return 1;
else
	return -1;
----

rather than:

----
return (value - ((byte) v))
----

By the way, I'm completely new to mono, so I'm expecting there to be a
good reason and that I'm making rash assumptions here :-)

-- 
Cheers
James Ots