public boolean equals(Object other) {if (!(other instanceof LongBuffer)) {return false;}LongBuffer otherBuffer = (LongBuffer) other;if (remaining() != otherBuffer.remaining()) {return false;}int myPosition = position;int otherPosition = otherBuffer.position;boolean equalSoFar = true;while (equalSoFar && (myPosition < limit)) {equalSoFar = get(myPosition++) == otherBuffer.get(otherPosition++);}return equalSoFar;}

public override bool Equals(object other){if (!(other is java.nio.LongBuffer)){return false;}java.nio.LongBuffer otherBuffer = (java.nio.LongBuffer)other;if (remaining() != otherBuffer.remaining()){return false;}int myPosition = _position;int otherPosition = otherBuffer._position;bool equalSoFar = true;while (equalSoFar && (myPosition < _limit)){equalSoFar = get(myPosition++) == otherBuffer.get(otherPosition++);}return equalSoFar;}
