/// <summary> /// Compares given object with this object. /// </summary> /// <param name="obj">Object to compare this object with.</param> /// <returns>True if given object and this object are the same, false otherwise.</returns> public override bool Equals(object obj) { if (obj is Offence) { Offence that = (Offence)obj; if (this.ID == that.ID) { return(true); } } return(false); }
public SocialMediaMessage(int id, DateTime dateTime, string message, string user, string handle, Location location, long twitterID, Offence offence = null, int Mediatype = 0) { ID = id; DateTime = dateTime; Message = message; User = user; Handle = handle; Location = location; MediaType = Mediatype; Offence = offence; TwitterID = twitterID; }