コード例 #1
0
        // 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

            cmemorandum memorandum = obj as cmemorandum;

            if (memorandum.id == id && memorandum.MTIME == MTIME &&
                memorandum.PLACE == PLACE &&
                memorandum.incident == incident &&
                memorandum.CONTACTSID == CONTACTSID)
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
 public object Clone(cmemorandum memorandum)
 {
     if (memorandum == null)
     {
         memorandum = new cmemorandum();
     }
     memorandum.id         = id;
     memorandum.MTIME      = MTIME;
     memorandum.PLACE      = PLACE;
     memorandum.incident   = incident;
     memorandum.CONTACTSID = CONTACTSID;
     return(memorandum);
 }
コード例 #3
0
        public object Clone()
        {
            cmemorandum memorandum = new cmemorandum();

            return(Clone(memorandum));
        }