public string ToPostData() { // Querying for closed gas stations is currently not supported string postString = String.Format("data=[\"\",\"{0}\",{1},{2},{3},{4}]", this.FuelType.ToSpritpreisrechnerString(), Longitude1.ToString(CultureInfo.InvariantCulture), Latitude1.ToString(CultureInfo.InvariantCulture), Longitude2.ToString(CultureInfo.InvariantCulture), Latitude2.ToString(CultureInfo.InvariantCulture)); return(postString); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="Longitude1">A longitude.</param> /// <param name="Longitude2">Another longitude.</param> /// <returns>true|false</returns> public static Boolean operator >(Longitude Longitude1, Longitude Longitude2) { if ((Object)Longitude1 == null) { throw new ArgumentNullException("The given Longitude1 must not be null!"); } if ((Object)Longitude2 == null) { throw new ArgumentNullException("The given Longitude2 must not be null!"); } return(Longitude1.CompareTo(Longitude2) > 0); }
/// <summary> /// Compares two longitudes for equality. /// </summary> /// <param name="Longitude1">A longitude.</param> /// <param name="Longitude2">Another longitude.</param> /// <returns>True if both match; False otherwise.</returns> public static Boolean operator ==(Longitude Longitude1, Longitude Longitude2) { // If both are null, or both are same instance, return true. if (Object.ReferenceEquals(Longitude1, Longitude2)) { return(true); } // If one is null, but not both, return false. if (((Object)Longitude1 == null) || ((Object)Longitude2 == null)) { return(false); } return(Longitude1.Equals(Longitude2)); }