// override object.Equals public override bool Equals(object obj) { // // See the full list of guidelines at // http://go.microsoft.com/fwlink/?LinkID=85237 // and also the guidance for operator== at // http://go.microsoft.com/fwlink/?LinkId=85238 // if (obj == null || GetType() != obj.GetType()) { return(false); } // TODO: write your implementation of Equals() here cdiary diary = obj as cdiary; if (diary.id == id && diary.MTIME == MTIME && diary.PLACE == PLACE && diary.incident == incident && diary.CONTACTSID == CONTACTSID) { return(true); } return(false); }
public object Clone(cdiary diary) { if (diary == null) { diary = new cdiary(); } diary.id = id; diary.MTIME = MTIME; diary.PLACE = PLACE; diary.incident = incident; diary.CONTACTSID = CONTACTSID; return(diary); }
public object Clone() { cdiary diary = new cdiary(); return(Clone(diary)); }