Skip to content

Instantly share code, notes, and snippets.

@yemrekeskin
Created July 21, 2014 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yemrekeskin/a3c8ee8639d6d1e04cb3 to your computer and use it in GitHub Desktop.
Save yemrekeskin/a3c8ee8639d6d1e04cb3 to your computer and use it in GitHub Desktop.
override Equals
public class CronLog
:BaseModel
{
public int ProcessId { get; set; }
public string ProcessName { get; set; }
public DateTime RequestTime { get; set; }
public DateTime ActualRequestTime { get; set; }
public DateTime ResponseTime { get; set; }
public int ResponseCode { get; set; }
public string ExceptionMessage { get; set; }
public string Response { get; set; }
public string Url { get; set; }
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != typeof(CronLog)) return false;
return Equals((CronLog)obj);
}
public bool Equals(CronLog other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return other.GetHashCode() == this.GetHashCode();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment