[corlib] Make primitive types smaller than int compare result compatible
[mono.git] / mcs / class / corlib / System / UInt16.cs
index 8ca6a6eab38031b54144b8060bab10182058b8e0..42ceeb7205aa99308d3bf731df0415edcb7528f1 100644 (file)
@@ -49,7 +49,7 @@ namespace System
                        if(!(value is System.UInt16))
                                throw new ArgumentException (Locale.GetText ("Value is not a System.UInt16."));
 
-                       return this.m_value - ((ushort) value);
+                       return CompareTo ((ushort) value);
                }
 
                public override bool Equals (object obj)
@@ -218,6 +218,7 @@ namespace System
                {
                        return m_value;
                }
+
                uint IConvertible.ToUInt32 (IFormatProvider provider)
                {
                        return System.Convert.ToUInt32 (m_value);