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; }
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); }