Example #1
0
        /// <summary>
        /// Returns the string representation of this object</summary>
        /// <param name="format">Optional standard numeric format string for a floating point number.
        /// If null, "R" is used for round-trip support in case the string is persisted.
        /// http://msdn.microsoft.com/en-us/library/vstudio/dwhawy9k(v=vs.100).aspx </param>
        /// <param name="formatProvider">Optional culture-specific formatting provider. This is usually
        /// a CultureInfo object or NumberFormatInfo object. If null, the current culture is used.
        /// Use CultureInfo.InvariantCulture for persistence.</param>
        /// <returns>String representation of object</returns>
        public string ToString(string format, IFormatProvider formatProvider)
        {
            string listSeparator = StringUtil.GetNumberListSeparator(formatProvider);

            // For historic reasons, use "R" for round-trip support, in case this string is persisted.
            if (format == null)
            {
                format = "R";
            }

            return(String.Format(
                       "{0}{6} {1}{6} {2}{6} {3}{6} {4}{6} {5}",
                       Right.ToString(format, formatProvider),
                       Left.ToString(format, formatProvider),
                       Top.ToString(format, formatProvider),
                       Bottom.ToString(format, formatProvider),
                       Near.ToString(format, formatProvider),
                       Far.ToString(format, formatProvider),
                       listSeparator));
        }
 /// <summary>Returns a String that represents the current BoundingFrustum.</summary>
 public override string ToString()
 {
     return(string.Format(CultureInfo.CurrentCulture, "{{Near:{0} Far:{1} Left:{2} Right:{3} Top:{4} Bottom:{5}}}", new object[] { Near.ToString(), Far.ToString(), Left.ToString(), Right.ToString(), Top.ToString(), Bottom.ToString() }));
 }