/// <summary> /// Returns a <see cref="System.String"/> that represents this instance. /// </summary> /// <param name="format"> /// The format. /// </param> /// <param name="formatProvider"> /// The format provider. /// </param> /// <param name="unitProvider"> /// The unit provider. /// </param> /// <returns> /// A <see cref="System.String"/> that represents this instance. /// </returns> public string ToString(string format, IFormatProvider formatProvider, IUnitProvider unitProvider) { if (unitProvider == null) { unitProvider = formatProvider as IUnitProvider ?? UnitProvider.Default; } return(unitProvider.Format(format, formatProvider, this)); }