FormatsNumber(Object, Int32, String, NullableChar, Boolean, Boolean, Boolean) Method

Formats a number to a string based on the indicated parameters.

Definition

Namespace: Aliquo.Core
Assembly: Aliquo.Core (in Aliquo.Core.dll) Version: 5.0.9179.22651
C#
public static string Number(
	Object value,
	int maxLength = 0,
	string format = "",
	char? decimalSymbol = '.',
	bool useTotalLength = true,
	bool zerosToLeft = true,
	bool initialSign = false
)

Parameters

value  Object
Numeric value to format.
maxLength  Int32  (Optional)
Maximum chain length.
format  String  (Optional)
Format expression to format the number (default "0" for integer numbers and "0.00" for numbers with decimals).
decimalSymbol  NullableChar  (Optional)
Determines the symbol to be used for decimals.
useTotalLength  Boolean  (Optional)
The returned string is wrapped with zeros or blanks if it is shorter than the indicated length.
zerosToLeft  Boolean  (Optional)
Indicates whether the setting character should be a zero or a white space.
initialSign  Boolean  (Optional)
Indicates whether the returned string should always have a sign symbol (+ or -).

Return Value

String
String with the value formatted.

See Also