* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.Data / System.Data.SqlTypes / SqlInt64.cs
index 2b3379307dec4dc85ac477d2a41ff5d989580f35..c9a22a2632761315544601b2914fd7f4d88db4fe 100644 (file)
@@ -102,10 +102,22 @@ namespace System.Data.SqlTypes
                                return 1;
                        else if (!(value is SqlInt64))
                                throw new ArgumentException (Locale.GetText ("Value is not a System.Data.SqlTypes.SqlInt64"));
-                       else if (((SqlInt64)value).IsNull)
+                       return CompareSqlInt64 ((SqlInt64) value);
+               }
+
+               #if NET_2_0
+               public int CompareTo (SqlInt64 value)
+               {
+                       return CompareSqlInt64 ((SqlInt64) value);
+               }
+               #endif  
+       
+               private int CompareSqlInt64 (SqlInt64 value)
+               {
+                       if (value.IsNull)
                                return 1;
                        else
-                               return this.value.CompareTo (((SqlInt64)value).Value);
+                               return this.value.CompareTo (value.Value);
                }
 
                public static SqlInt64 Divide (SqlInt64 x, SqlInt64 y)
@@ -160,6 +172,13 @@ namespace System.Data.SqlTypes
                        return (x % y);
                }
 
+               #if NET_2_0
+               public static SqlInt64 Modulus (SqlInt64 x, SqlInt64 y)
+               {
+                       return (x % y);
+               }
+               #endif
+
                public static SqlInt64 Multiply (SqlInt64 x, SqlInt64 y)
                {
                        return (x * y);