示例#1
0
 public override bool Equals(object obj)
 {
     if (obj is TZID)
     {
         TZID tzid = (TZID)obj;
         return (this.GloballyUnique == tzid.GloballyUnique && this.ID == tzid.ID);
     }
     else if (obj is string)
     {
         object tzid = new TZID();
         if (((TZID)tzid).TryParse(obj.ToString(), ref tzid))
             return tzid.Equals(this);                
     }
     return false;
 }
示例#2
0
 public override bool Equals(object obj)
 {
     if (obj is TZID)
     {
         TZID tzid = (TZID)obj;
         return(this.GloballyUnique.Equals(tzid.GloballyUnique) && this.ID.Equals(tzid.ID));
     }
     else if (obj is string)
     {
         object tzid = new TZID();
         if (((TZID)tzid).TryParse(obj.ToString(), ref tzid))
         {
             return(tzid.Equals(this));
         }
     }
     return(false);
 }