forked from ServiceStack/ServiceStack.Text
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoint.cs
More file actions
31 lines (28 loc) · 909 Bytes
/
Copy pathPoint.cs
File metadata and controls
31 lines (28 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
namespace ServiceStack.Text.Tests.Support
{
public class Point
{
public double Latitude { get; set; }
public double Longitude { get; set; }
public bool Equals(Point other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return other.Latitude == Latitude && other.Longitude == Longitude;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != typeof(Point)) return false;
return Equals((Point)obj);
}
public override int GetHashCode()
{
unchecked
{
return (Latitude.GetHashCode() * 397) ^ Longitude.GetHashCode();
}
}
}
}