/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param> /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creting the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(MolarHeatCapacityUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider) { var quantityFormat = FormatCache <MolarHeatCapacityUnit> .GetOrCreate(null, unit, symbolFormat); return(this.ToString(quantityFormat, formatProvider)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(DataUnit unit) { var quantityFormat = FormatCache <DataUnit> .GetOrCreate(null, unit); return(ToString(quantityFormat, null)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param> /// <param name="unit">The unit to use in the conversion</param> /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(string valueFormat, DataUnit unit, SymbolFormat symbolFormat) { var quantityFormat = FormatCache <DataUnit> .GetOrCreate(valueFormat, unit, symbolFormat); return(ToString(quantityFormat, null)); }
public string ToString(string valueFormat, MolarMassUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider) { var quantityFormat = FormatCache <MolarMassUnit> .GetOrCreate(valueFormat, unit, symbolFormat); return(this.ToString(quantityFormat, formatProvider)); }
/// <summary> /// Returns a string with the <see cref="SiValue"/> and <see cref="SiUnit"/> /// </summary> /// <param name="provider">Specifies the formatProvider to be used.</param> /// <returns>The string representation of the <see cref="Data"/></returns> public string ToString(IFormatProvider provider) { var quantityFormat = FormatCache <DataUnit> .GetOrCreate(string.Empty, SiUnit); return(ToString(quantityFormat, provider)); }
public string ToString(string valueFormat, string symbolFormat) { var quantityFormat = FormatCache <MolarMassUnit> .GetOrCreate(valueFormat, symbolFormat); return(this.ToString(quantityFormat, (IFormatProvider?)null)); }
public string ToString(MolarMassUnit unit, IFormatProvider formatProvider) { var quantityFormat = FormatCache <MolarMassUnit> .GetOrCreate(null, unit); return(this.ToString(quantityFormat, formatProvider)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param> /// <param name="unit">The unit to use in the conversion</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(string valueFormat, AnglePerUnitlessUnit unit) { var quantityFormat = FormatCache <AnglePerUnitlessUnit> .GetOrCreate(valueFormat, unit); return(ToString(quantityFormat, null)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param> /// <param name="unit">The unit to use in the conversion</param> /// <param name="symbolFormat">Specifies the symbol format to use when creating the string representation.</param>/// /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creating the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(string valueFormat, AnglePerUnitlessUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider) { var quantityFormat = FormatCache <AnglePerUnitlessUnit> .GetOrCreate(valueFormat, unit, symbolFormat); return(ToString(quantityFormat, formatProvider)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(AnglePerUnitlessUnit unit, SymbolFormat symbolFormat) { var quantityFormat = FormatCache <AnglePerUnitlessUnit> .GetOrCreate(null, unit, symbolFormat); return(ToString(quantityFormat, null)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creting the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(AnglePerUnitlessUnit unit, IFormatProvider formatProvider) { var quantityFormat = FormatCache <AnglePerUnitlessUnit> .GetOrCreate(null, unit); return(ToString(quantityFormat, formatProvider)); }
/// <summary> /// If an invalid format is provided the string will look like: {value: ??} {unit: ??} /// </summary> /// <param name="format">Must be a composite format ex: \"F2 rad/ul\"</param> /// <returns>The string representation of the <see cref="AnglePerUnitless"/></returns> public string ToString(string format) { var quantityFormat = FormatCache <AnglePerUnitlessUnit> .GetOrCreate(format); return(ToString(quantityFormat, (IFormatProvider)null)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(LengthPerUnitlessUnit unit) { var quantityFormat = FormatCache <LengthPerUnitlessUnit> .GetOrCreate(null, unit); return(ToString(quantityFormat, null)); }
/// <summary> /// If an invalid format is provided the string will look like: {value: ??} {unit: ??} /// </summary> /// <param name="valueFormat">For formatting the scalar, format stings valid for <see cref="System.Double"/> are valid /// ex: F2</param> /// <param name="symbolFormat">For formatting the unit ex m/ul</param> /// <param name="formatProvider"></param> /// <returns>The string representation of the <see cref="LengthPerUnitless"/></returns> public string ToString(string valueFormat, string symbolFormat, IFormatProvider formatProvider) { var quantityFormat = FormatCache <LengthPerUnitlessUnit> .GetOrCreate(valueFormat, symbolFormat); return(ToString(quantityFormat, formatProvider)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param> /// <param name="unit">The unit to use in the conversion</param> /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creating the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(string valueFormat, VoltageUnit unit, IFormatProvider formatProvider) { var quantityFormat = FormatCache <VoltageUnit> .GetOrCreate(valueFormat, unit); return(this.ToString(quantityFormat, formatProvider)); }
public string ToString(string?format, IFormatProvider?formatProvider) { var quantityFormat = FormatCache <SolidAngleUnit> .GetOrCreate(format); return(this.ToString(quantityFormat, formatProvider)); }
public string ToString(IFormatProvider provider) { var quantityFormat = FormatCache <MolarMassUnit> .GetOrCreate(string.Empty, this.SiUnit); return(this.ToString(quantityFormat, provider)); }
public string ToString(string valueFormat, string symbolFormat, IFormatProvider formatProvider) { var quantityFormat = FormatCache <SolidAngleUnit> .GetOrCreate(valueFormat, symbolFormat); return(this.ToString(quantityFormat, formatProvider)); }
public string ToString(MolarMassUnit unit, SymbolFormat symbolFormat) { var quantityFormat = FormatCache <MolarMassUnit> .GetOrCreate(null, unit, symbolFormat); return(this.ToString(quantityFormat, null)); }
public string ToString(SolidAngleUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider) { var quantityFormat = FormatCache <SolidAngleUnit> .GetOrCreate(null, unit, symbolFormat); return(this.ToString(quantityFormat, formatProvider)); }
public string ToString(string valueFormat, MolarMassUnit unit) { var quantityFormat = FormatCache <MolarMassUnit> .GetOrCreate(valueFormat, unit); return(this.ToString(quantityFormat, null)); }
public string ToString(string valueFormat, SolidAngleUnit unit) { var quantityFormat = FormatCache <SolidAngleUnit> .GetOrCreate(valueFormat, unit); return(this.ToString(quantityFormat, null)); }
/// <summary> /// Returns a string with the <see cref="SiValue"/> and <see cref="SiUnit"/> /// </summary> /// <returns>The string representation of the <see cref="Data"/></returns> public override string ToString() { var quantityFormat = FormatCache <DataUnit> .GetOrCreate(null, this.SiUnit); return(this.ToString(quantityFormat, (IFormatProvider)null)); }
/// <summary> /// If an invalid format is provided the string will look like: {value: ??} {unit: ??} /// </summary> /// <param name="format">Must be a composite format ex: \"F2 V\"</param> /// <returns>The string representation of the <see cref="Voltage"/></returns> public string ToString(string format) { var quantityFormat = FormatCache <VoltageUnit> .GetOrCreate(format); return(this.ToString(quantityFormat, (IFormatProvider)null)); }
/// <summary> /// If an invalid format is provided the string will look like: {value: ??} {unit: ??} /// </summary> /// <param name="valueFormat">For formatting the scalar, format stings valid for <see cref="System.Double"/> are valid /// ex: F2</param> /// <param name="symbolFormat">For formatting of the unit ex bit</param> /// <returns>The string representation of the <see cref="Data"/></returns> public string ToString(string valueFormat, string symbolFormat) { var quantityFormat = FormatCache <DataUnit> .GetOrCreate(valueFormat, symbolFormat); return(ToString(quantityFormat, (IFormatProvider)null)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(VoltageUnit unit) { var quantityFormat = FormatCache <VoltageUnit> .GetOrCreate(null, unit); return(this.ToString(quantityFormat, null)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param> /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creting the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(DataUnit unit, SymbolFormat symbolFormat, IFormatProvider formatProvider) { var quantityFormat = FormatCache <DataUnit> .GetOrCreate(null, unit, symbolFormat); return(ToString(quantityFormat, formatProvider)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param> /// <param name="unit">The unit to use in the conversion</param> /// <param name="symbolFormat">Specifies the symbol format to use when creting the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(string valueFormat, VoltageUnit unit, SymbolFormat symbolFormat) { var quantityFormat = FormatCache <VoltageUnit> .GetOrCreate(valueFormat, unit, symbolFormat); return(this.ToString(quantityFormat, null)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="valueFormat">The format to use for the scalar value. Valid formats are formats valid for formatting <see cref="double"/></param> /// <param name="unit">The unit to use in the conversion</param> /// <param name="formatProvider">Specifies the <see cref="IFormatProvider"/> to use when creating the string representation.</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(string valueFormat, DataUnit unit, IFormatProvider formatProvider) { var quantityFormat = FormatCache <DataUnit> .GetOrCreate(valueFormat, unit); return(ToString(quantityFormat, formatProvider)); }
/// <summary> /// Converts the quantity value of this instance to its equivalent string representation. /// </summary> /// <param name="unit">The unit to use in the conversion</param> /// <returns>The string representation of the value of this instance.</returns> public string ToString(MolarHeatCapacityUnit unit) { var quantityFormat = FormatCache <MolarHeatCapacityUnit> .GetOrCreate(null, unit); return(this.ToString(quantityFormat, null)); }