* BigInteger.cs: Implement IComparable and IEquatable.
svn path=/trunk/mcs/; revision=153074
CoreAdd could avoid some resizes by checking for equal sized array that top overflow
*/\r
namespace System.Numerics {\r
- public struct BigInteger
+ public struct BigInteger : IComparable<BigInteger>, IEquatable<BigInteger>
{
//LSB on [0]
readonly uint[] data;
{
if (!(obj is BigInteger))
return false;
- BigInteger other = (BigInteger)obj;
+ return Equals ((BigInteger)obj);
+ }
+ public bool Equals (BigInteger other)
+ {
if (sign != other.sign)
return false;
if (data.Length != other.data.Length)
+2010-03-04 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * BigInteger.cs: Implement IComparable and IEquatable.
+
2010-03-04 Rodrigo Kumpera <rkumpera@novell.com>
* BigInteger.cs: Compare and relational ops.