public static bool ArePointEqual(DirectionPoint a, DirectionPoint b)
{
if (ReferenceEquals(a, b))
{
return true;
}
// If one is null, but not both, return false.
if (((object)a == null) || ((object)b == null))
{
return false;
}
// Return true if the fields match:
return a.StartPoint == b.StartPoint && a.Direction == b.Direction;
}