public PhoneNumTO(PhoneNum mdo) { this.areaCode = mdo.AreaCode; this.exchange = mdo.Exchange; this.number = mdo.Number; this.description = mdo.Description; }
/// <summary> /// Asserts all parts of phone number are equal /// </summary> /// <param name="obj">PhoneNum</param> /// <returns>True if all phone number pieces are equal</returns> public override bool Equals(object obj) { if (!(obj is PhoneNum)) { return(false); } PhoneNum temp = obj as PhoneNum; if (temp.AreaCode == this.areaCode && temp.Exchange == this.exchange && temp.Number == this.number) { return(true); } return(false); }