/// <summary> /// Converts the value of the current line to its equivalent string /// representation by using the specified format and culture-specific /// format information for its components. /// </summary> /// <param name="format">A standard or custom numeric format string.</param> /// <param name="provider">An object that supplies culture-specific formatting information.</param> /// <returns>The string representation of the current instance, as specified /// by format and provider.</returns> /// <exception cref="System.FormatException">format is not a valid format string.</exception> public string ToString(string format, IFormatProvider provider) { Contract.Ensures(Contract.Result <string>() != null); return(String.Format("({0}, {1})", Start.ToString(format, provider), End.ToString(format, provider))); }
/// <summary> /// Converts the value of the current ray to its equivalent string /// representation in Cartesian form by using the specified format and culture-specific /// format information for its components. /// </summary> /// <param name="format">A standard or custom numeric format string.</param> /// <returns>The string representation of the current instance in Cartesian form, as specified /// by format and provider.</returns> /// <exception cref="System.FormatException">format is not a valid format string.</exception> public string ToString(string format, IFormatProvider provider) { return(String.Format("Position:{0} Direction:{1}", Position.ToString(), Direction.ToString())); }