/** * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful. */ public bool equals(OneByteChunk rhs) { bool ivarsEqual = true; if (rhs.GetType() != this.GetType()) { return(false); } for (int idx = 0; idx < 1; idx++) { if (!(_otherParameters[idx] == rhs._otherParameters[idx])) { ivarsEqual = false; } } return(ivarsEqual); }
/** * Compares for reference equality and value equality. */ public bool equals(OneByteChunk rhs) { bool ivarsEqual = true; if(rhs.GetType() != this.GetType()) return false; if( ! (rhs._otherParameters.Length == 1)) ivarsEqual = false; if(ivarsEqual) { for(int idx = 0; idx < 1; idx++) { if(!(_otherParameters[idx] == rhs._otherParameters[idx])) ivarsEqual = false; } } return ivarsEqual; }