Skip to content

b2419f40 332b 2a2a bbf6 7d4ce361dc19

Axel Kesseler edited this page Oct 3, 2019 · 1 revision

CapacityConverter.Convert Method (Decimal, String, Int32, Boolean, CultureInfo)

Converts provided value into its string representation.

Namespace: Plexdata.Converters
Assembly: Plexdata.CapacityConverter (in Plexdata.CapacityConverter.dll) Version: 1.0.1

Syntax

C#

public static string Convert(
	decimal value,
	string unit,
	int decimals,
	bool calculate,
	CultureInfo culture
)

Parameters

 

value
Type: System.Decimal
The value to be converted.
unit
Type: System.String
The unit to get a capacity entity for.
decimals
Type: System.Int32
The number of decimal digits used for calculation.
calculate
Type: System.Boolean
True to force a result calculation, otherwise false.
culture
Type: System.Globalization.CultureInfo
The culture to be used for conversion.

Return Value

Type: String
The string representation of converted value.

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.

See Also

Reference

CapacityConverter Class
Convert Overload
Plexdata.Converters Namespace
CapacityConverter.Convert(Decimal, String, Int32, Boolean, Boolean, CultureInfo)

Clone this wiki locally