/// <summary> /// Converts provided value into its string representation. /// </summary> /// <remarks> /// This method converts provided value into its string representation /// by finding the best fitting capacity entity and using it to format /// provided value afterwards. /// </remarks> /// <param name="value"> /// The value to be converted. /// </param> /// <param name="unit"> /// The unit to get a capacity entity for. /// </param> /// <param name="decimals"> /// The number of decimal digits used for calculation. /// </param> /// <param name="calculate"> /// True to force a result calculation, otherwise false. /// </param> /// <param name="culture"> /// The culture to be used for conversion. /// </param> /// <returns> /// The string representation of converted value. /// </returns> /// <seealso cref="Convert(Decimal, String, Int32, Boolean, Boolean, CultureInfo)"/> public static String Convert(Decimal value, String unit, Int32 decimals, Boolean calculate, CultureInfo culture) { return(CapacityConverter.Convert(value, unit, decimals, calculate, Defaults.Intercept, culture)); }
/// <summary> /// Converts provided value into its string representation. /// </summary> /// <remarks> /// This method converts provided value into its string representation /// by finding the best fitting capacity entity and using it to format /// provided value afterwards. /// </remarks> /// <param name="value"> /// The value to be converted. /// </param> /// <param name="unit"> /// The unit to get a capacity entity for. /// </param> /// <param name="decimals"> /// The number of decimal digits used for calculation. /// </param> /// <returns> /// The string representation of converted value. /// </returns> /// <seealso cref="Convert(Decimal, String, Int32, Boolean, Boolean, CultureInfo)"/> public static String Convert(Decimal value, String unit, Int32 decimals) { return(CapacityConverter.Convert(value, unit, decimals, Defaults.Calculate, Defaults.Intercept, null)); }