public virtual bool Equals(LongArray other) { if (this == other) { return(true); } if (other == null) { return(false); } int usedLength = GetUsedLength(); if (other.GetUsedLength() != usedLength) { return(false); } for (int i = 0; i < usedLength; i++) { if (m_ints[i] != other.m_ints[i]) { return(false); } } return(true); }
public void AddShiftedByWords(LongArray other, int words) { int usedLength = other.GetUsedLength(); if (usedLength != 0) { int num = usedLength + words; if (num > m_ints.Length) { m_ints = ResizedInts(num); } Add(m_ints, words, other.m_ints, 0, usedLength); } }
public void AddShiftedByWords(LongArray other, int words) { int otherUsedLen = other.GetUsedLength(); if (otherUsedLen == 0) { return; } int minLen = otherUsedLen + words; if (minLen > m_ints.Length) { m_ints = ResizedInts(minLen); } Add(m_ints, words, other.m_ints, 0, otherUsedLen); }
public virtual bool Equals(LongArray other) { if (this == other) return true; if (null == other) return false; int usedLen = GetUsedLength(); if (other.GetUsedLength() != usedLen) { return false; } for (int i = 0; i < usedLen; i++) { if (m_ints[i] != other.m_ints[i]) { return false; } } return true; }