CoreAdd could avoid some resizes by checking for equal sized array that top overflow
*/\r
namespace System.Numerics {\r
- public struct BigInteger : IComparable<BigInteger>, IEquatable<BigInteger>
+ public struct BigInteger : IComparable, IComparable<BigInteger>, IEquatable<BigInteger>
{
//LSB on [0]
readonly uint[] data;
return left + right;
}
+ public int CompareTo (object obj)
+ {
+ if (obj == null)
+ return 1;
+
+ if (!(obj is BigInteger))
+ return -1;
+
+ return Compare (this, (BigInteger)obj);
+ }
+
public int CompareTo (BigInteger other)
{
return Compare (this, other);
+2010-03-04 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * BigInteger.cs: IComparable.
+
2010-03-04 Rodrigo Kumpera <rkumpera@novell.com>
* BigInteger.cs: Relational ops for ulong with switched args.